Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-05

Reason of procedure overload RTLeventWaitFor(state, timeout) return.

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

kyan

Hello all,

I am trying to port a small library previously written for Delphi and Kylix to FPC. This library contains an "event" object that has similar functionality to a windows kernel event. This object is supposed to have a method that lets you wait for the event object with a timeout and return whether the event was signaled of the timeout expired. After some searching I concluded that for a platform-independant implementation I should use the RTLeventXXX regular procedures/functions declared in threadh.inc because the basiceventXXX ones are stated as obsolete in the documentation.

I noticed that the RTLeventWaitFor(state, timeout) overload does not return anything to tell the caller why it returned (signal or timeout) as Windows WaitForSingleObject() does. Is there a way to get the result of the last timed wait for the current thread? If not is there another way to implement a platform-independant event, maybe using some other set of functions?

TIA

Constantine.

Reply by email