Timeout values for NamedEvents

A general discussion forum.
Posts: 40
Joined: 03 Dec 2011, 18:48

Timeout values for NamedEvents

Postby codecandy2k » 29 Jan 2012, 01:54

So I was wondering if there was a reason that Poco::NamedEvent does not expose a timeout value? Blocking infinitely for an event is bad, but blocking infinitely for an event that may be dependent on another process is extra bad.

Posts: 1268
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Timeout values for NamedEvents

Postby guenter » 01 Feb 2012, 23:55

Mostly because the underlying OS APIs do not offer such a feature consistently, especially for platforms only supporting semop() (although Linux has semtimedop(), but this is not portable). Similarly, sem_timedwait() is also not available consistently (e.g. on Solaris it isn't available before Solaris 10). If we added this, we'd also need to add at least a feature check macro or function to check whether timed wait is available. Also timedwait should probably fall back to normal wait if timeouts are not supported by the OS.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests