Results 1 to 6 of 6

Thread: without Qt::QueuedConnection will crash

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jun 2009
    Posts
    74
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default Re: without Qt::QueuedConnection will crash

    Hi tbscope,you mean the slot of the thread executed in the main thread ?


    Quote Originally Posted by tbscope View Post
    Here the big problem is that you're dealing with two distinct event loops.
    Even with a queued connection, the logic is still wrong as the slot of the thread is not executed in the thread itself but in the main thread resulting in possible crashes.

    Edit: never mind, the connection is made in the main thread. Just ignore this post.
    Thanks a lot for you explanation,
    it was just a test in order to produce a loop

    Quote Originally Posted by Lesiok View Post
    Because without Qt::QueuedConnection emmiting signal is like a calling slot function. So You call onDoComm() BEFORE ending this method that is to say "classic stack overflow".
    With Qt::QueuedConnection slot function is calling by signal dispatcher in idle time.

    Question is : why You emit StartSignal() in onDoComm() ?
    Last edited by hashb; 1st December 2010 at 07:05.

Similar Threads

  1. QueuedConnection pointer problem
    By cafu in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2010, 13:24
  2. Replies: 1
    Last Post: 6th November 2009, 18:33
  3. Qt::QueuedConnection and passing by Reference
    By soul_rebel in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2007, 18:47
  4. How to use Qt::QueuedConnection?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 30th July 2007, 08:04
  5. QueuedConnection's and threads
    By gri in forum Qt Programming
    Replies: 14
    Last Post: 24th January 2007, 09:22

Tags for this Thread

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.