Results 1 to 4 of 4

Thread: Accessing deleted memory, Producer Consumer app

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 14 Times in 12 Posts

    Default Re: Accessing deleted memory, Producer Consumer app

    You are using a mutex to ensure that there is no race condition between your thread?
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: Accessing deleted memory, Producer Consumer app

    Hi,

    Sorry for delay.

    You are using a mutex to ensure that there is no race condition between your thread?
    I'm using two QWaitConditions. The two threads work well without deadlocks. The problem is on visualization on the main thread where I don't want to use one more wait condition.

    Thanks,
    Òscar Llarch i Galán

  3. #3
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 14 Times in 12 Posts

    Default Re: Accessing deleted memory, Producer Consumer app

    Quote Originally Posted by ^NyAw^ View Post
    Hi,

    Sorry for delay.



    I'm using two QWaitConditions. The two threads work well without deadlocks. The problem is on visualization on the main thread where I don't want to use one more wait condition.

    Thanks,
    Sorry for the delay with my reply, but the product my company is working is close to master date, so it's some sort of busy weeks at the moment.

    Why not use another QWaitCondition? One way or the other you must tell your GUI Thread when it is allowed to fetch new data to render.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

Similar Threads

  1. Speed up Producer Consumer Threads
    By ^NyAw^ in forum Qt Programming
    Replies: 7
    Last Post: 29th February 2008, 18:38
  2. Producer Consumer
    By ^NyAw^ in forum Qt Programming
    Replies: 16
    Last Post: 17th November 2006, 19:53

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.