OFSemaphore::wait(time)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Shaeto
Posts: 147
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

OFSemaphore::wait(time)

#1 Post by Shaeto »

just fyi: this function uses posix sem_timedwait which is based on CLOCK_REALTIME, so, if between clock_gettime and sem_timedwait system time is will be changed sem_timedwait have a chance to work indefinitely...

i am not sure what changed in latest RH8/CO8 patches but now this chance is much bigger

posix does not provide wait based on CLOCK_MONOTONIC but it seems we can solve problem using std::condition_variable+std::mutex

Shaeto
Posts: 147
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

Re: OFSemaphore::wait(time)

#2 Post by Shaeto »

update: glibc 2.30+ provides pthread_cond_clockwait и sem_clockwait, imho it will be very interesting to see these functions in ofthread.cc (if available)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest