Results 1 to 11 of 11

Thread: Spliting data aquisition/visualisation into threads

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    8
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Spliting data aquisition/visualisation into threads

    Great

    Thank you once more. Your answers were very helpful.


    Added after 7 minutes:


    Quote Originally Posted by wysota View Post
    I would suggest to use a circular buffer protected by two semaphores to avoid overflow and underflow. This usually works very well for quick concurrent access. Of course if you can afford to be put on hold to prevent overload (if you can't a list won't help as sooner or later you'll run out of memory).
    I do it in exactly same way in comunication between Serial and DataProcessor threads. I thought that it is not correct way in synchronization with the main thread.
    Last edited by robodude; 30th March 2013 at 20:24.

  2. #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: Spliting data aquisition/visualisation into threads

    I have no idea what you do so it is not possible for me to determine if what you are doing is right or not. A circular buffer protected by two semaphores is a classic non-blocking solution for a producer-consumer problem. I'm assuming it is not what you are doing if you're asking your question (about signals and slots) here.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Communication/data sharing between threads
    By Tottish in forum Newbie
    Replies: 6
    Last Post: 8th July 2013, 06:33
  2. Replies: 3
    Last Post: 17th April 2012, 09:09
  3. How do I access data between threads
    By yodasoda in forum Qt Programming
    Replies: 3
    Last Post: 26th February 2010, 19:10
  4. Sharing data between threads
    By bbui210 in forum Qt Programming
    Replies: 15
    Last Post: 19th October 2008, 17:56
  5. Sharing data across threads
    By jphn_crichton in forum Qt Programming
    Replies: 11
    Last Post: 5th May 2008, 18:29

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.