Re: [osg-users] OpenThreads::Condition and spurious wakeups

2009-05-27 Thread J.P. Delport
Hi, Cory Riddell wrote: I'm using boost::threads, but not any of the timed wait stuff. I run my viewer in its own thread. It is my understanding that for a timed wait, you do need to manually track how much time has actually elapsed Only if the time specified is a relative time. Pthreads

[osg-users] OpenThreads::Condition and spurious wakeups

2009-05-26 Thread J.P. Delport
Hi all, I'm using OpenThreads in a cross-platform application and wanted to use the Condition implementation, specifically the wait(timeout) version. However, the pthread docs suggest that pthread_cond_timedwait (that is used by OT) can return without explicitly being signalled (so-called

Re: [osg-users] OpenThreads::Condition and spurious wakeups

2009-05-26 Thread Cory Riddell
I'm using boost::threads, but not any of the timed wait stuff. I run my viewer in its own thread. It is my understanding that for a timed wait, you do need to manually track how much time has actually elapsed and restart the wait if necessary. Cory J.P. Delport wrote: Hi all, I'm using

Re: [osg-users] OpenThreads::Condition and spurious wakeups

2009-05-26 Thread Cory Riddell
The first reply to this question is pretty good: http://stackoverflow.com/questions/625340/spurious-unblocking-in-boost-thread Cory J.P. Delport wrote: Hi all, I'm using OpenThreads in a cross-platform application and wanted to use the Condition implementation, specifically the