Results 1 to 6 of 6

Thread: Network programming and the main thread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Network programming and the main thread

    Quote Originally Posted by invictus View Post
    Ok I get it. Smart way of doing things really. So lets say I create a thread with a event-loop to take care of these signals.
    That event loop is also necessary to handle the socket.

    Quote Originally Posted by invictus View Post
    Is there anything similar for QT4? I heard somewhere that with signals and slots I didnt have to care about these things as they were thread-safe, but I would rather get this confirmed than to discover it after thousands of lines of code.
    You can use queued signal-slot connections safely. They were especially designed to handle the communication between threads (in fact they're just a more pleasant version of events).

    Just watch out for automatic connections when dealing with threads.

  2. The following user says thank you to jacek for this useful post:

    invictus (16th March 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.