abstract class Cute::Signal
- Cute::Signal
- Reference
- Object
Overview
Base class for Cute.signal
Direct Known Subclasses
Defined in:
cute/signal.crInstance Method Summary
-
#disconnect(handler_hash)
Removes the handler with the handle handler_hash.
-
#disconnect
Removes all handlers
-
#name : String | Nil
Returns the name of the signal, if applicable.
-
#wait
Waits for the next event and returns the signal arguments.
Macro Summary
-
implementation(call, async)
Private-ish macro writing methods as required by
Signal
for a sub-class of it.
Instance Method Detail
def wait
#
Waits for the next event and returns the signal arguments.
See samples/wait.cr
for a usage example.
Macro Detail
macro implementation(call, async)
#
Private-ish macro writing methods as required by Signal
for a sub-class
of it. call
is expected to be a CallNode
, and async
if the signal
emission shall be delivered asynchronously, or right away.
Note: You usually don't use this macro yourself. See Cute.signal
instead.