Results 1 to 2 of 2

Thread: Queued connection / Signal accumulation

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Queued connection / Signal accumulation

    I think a better way is to make sure events are processed fast enough. Once you receive an event, store its data in some buffer. At that point you can decide to discard some lagging data. Then quickly return from the handler so that other events can be processed. Then use a timer that will be fetching frames at a specified frequency and process them there. Even if you get a lag, all "overflowing" events can discard their data (or some other data waiting to be processed) and everything should work. Just be sure to synchronize the buffer if you wish to use multiple threads for that.

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

    pokey909 (23rd March 2008)

Similar Threads

  1. How to use Signal through direct connection
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2007, 07:07
  2. Signal and slot connection graph
    By fahlen in forum General Discussion
    Replies: 4
    Last Post: 27th November 2007, 13:47
  3. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  4. signal slot connection
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 4th July 2006, 13:31
  5. queued signal/slot connection with QList<int>
    By smalls in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 14:32

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.