Description
Record cancellation and wake every operation waiting on this token. Raises Program_Error when an existing borrowed wake descriptor cannot be signalled.
Await_Request
entry Await_Request
Wait until Request records terminal cancellation. This protected entry is useful for task coordination that does not involve an OS descriptor.
Request
procedure Request
Record cancellation and wake every operation waiting on this token. Raises Program_Error when an existing borrowed wake descriptor cannot be signalled.
Requested
function Requested return Boolean
Inspect the one-shot state without allocating a wake descriptor.
Return value
True after Request has completed
Wait_Source
procedure Wait_Source
(FD : out Interfaces.C.int; Already_Requested : out Boolean)
Borrow the readable wake descriptor. Ownership remains with Token; callers must not close it, and Token must outlive the wait. No descriptor is allocated when cancellation was already requested.
Parameters
- FD
Borrowed descriptor, or -1 when already requested
- Already_Requested
True when Request preceded this call
Raised exceptions
- Program_Error
Wake descriptor creation fails