Description
Record cancellation and wake every operation waiting on this token. Program_Error is raised when an existing borrowed wake descriptor cannot be signalled. Cancellation remains recorded when signalling fails.
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. Program_Error is raised when an existing borrowed wake descriptor cannot be signalled. Cancellation remains recorded when signalling fails.
Requested
function Requested return Boolean
Inspect the one-shot state without allocating a wake descriptor.
Return value
True once Request records cancellation, including when wake signaling subsequently fails
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