Results 1 to 2 of 2

Thread: communication between threads

  1. #1
    Join Date
    Nov 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default communication between threads

    how to communicate two threads and their types(or)methods...

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: communication between threads

    Same way as without threads: you call methods directly or have signal/slot connections.

    The only difference is that you need to protect against concurrent access of data using synchronization helpers such as QMutex and that for certain type of signal/slot connections the receiving thread needs to run an event loop.

    Cheers,
    _

Similar Threads

  1. Communication/data sharing between threads
    By Tottish in forum Newbie
    Replies: 6
    Last Post: 8th July 2013, 06:33
  2. Communication between QThread and boost threads
    By ustulation in forum General Programming
    Replies: 1
    Last Post: 11th February 2013, 08:39
  3. Communication between Threads
    By Wan-Hi in forum Newbie
    Replies: 11
    Last Post: 24th January 2013, 12:52
  4. Replies: 4
    Last Post: 7th March 2010, 16:58
  5. Threads communication
    By probine in forum Qt Programming
    Replies: 4
    Last Post: 31st March 2006, 14:46

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.