raise-flag ( flag -- )
Flags
Prev:flag? ( object -- ? )
Next:wait-for-flag ( flag -- )


Vocabulary
concurrency.flags

Inputs and outputs
flaga flag


Word description
Raises a flag, notifying any threads waiting on it. Does nothing if the flag has already been raised.

Definition
USING: accessors concurrency.conditions kernel ;

IN: concurrency.flags

: raise-flag ( flag -- )
dup value>> [ drop ] [ t >>value threads>> notify-all ] if
;