mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
26 lines
645 B
Modula-2
26 lines
645 B
Modula-2
# An ``event`` is a simple synchronization object. It contains up to 64 signals
|
|
# that threads can wait for and signal in parallel.
|
|
|
|
object event : object {
|
|
uid f441e03da5516b1a
|
|
|
|
capabilities [
|
|
signal
|
|
wait
|
|
]
|
|
|
|
method create [constructor]
|
|
|
|
# Signal events on this object
|
|
method signal [cap:signal] {
|
|
param signals uint64 # A bitset of which events to signal
|
|
}
|
|
|
|
# Wait for signaled events on this object
|
|
method wait [cap:wait] {
|
|
param signals uint64 [out] # A bitset of which events were signaled
|
|
param timeout uint64 # Wait timeout in nanoseconds
|
|
}
|
|
}
|
|
|