class Symphony::AwaitableSignal

Defined in:

symphony/awaitable_signal.cr

Instance Method Summary

Instance Method Detail

def done! : Bool #

Marks the signal as completed. All fibers that are waiting for it will be woken up.

Calling it multiple times is safe. The first call will return true, but all calls after that will return false.


[View source]
def done? : Bool #

Nonblocking check if the signal is completed.


[View source]
def wait : Nil #

Block until completed. If it is already completed, it will return immediately.


[View source]
def wait_or_timeout(max_wait : Time::Span | Nil) : Nil #

Waits for completions (0 disables the timeout). If it is already completed, it will return immediately.


[View source]