Poco::Event windows

Please post support and help requests here.
Posts: 1
Joined: 19 Mar 2013, 18:46

Poco::Event windows

Postby mar0na » 19 Mar 2013, 19:04


Why is the timeout "milliseconds" incremented with one?

Additional I search a function with that I could check if the event is set without wait. In Windows this is possibile with WaitForSingleObject and dwMilliseconds is zero. Is something exist for Linux?

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
"dwMilliseconds [in]
The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the object is signaled or the interval elapses. If dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately. If dwMilliseconds is INFINITE, the function will return only when the object is signaled."


Code: Select all

bool EventImpl::waitImpl(long milliseconds)
   switch (WaitForSingleObject(_event, milliseconds + 1))            // <- ????
      return false;
   case WAIT_OBJECT_0:
      return true;
      throw SystemException("wait for event failed");      


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests