Re: PR_WaitCondVar
Wan-Teh Chang <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.nspr |
|---|---|
| Message-ID | <[email protected]> |
Sabyasachi Ruj wrote: > Hello, > How can I determine that 'PR_WaitCondVar' returned because of timeout or > because it has received the notification? > In both cases that function returns PR_SUCCESS. > > I've gone through the documentation but do not understand what it meant. It is a design decision that PR_WaitCondVar does not report a timeout. If you care about timeout, you must call PR_IntervalNow() before and after the PR_WaitCondVar call and see if the elapsed time is greater than the timeout. The rationale for the design decision is that it is hard for the implementation to report a timeout accurately. Wan-Teh