Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,29 @@
declare
fun {NewEvent}
{NewCell _}
end
proc {SignalEvent Event}
@Event = unit
end
proc {ResetEvent Event}
Event := _
end
proc {WaitEvent Event}
{Wait @Event}
end
E = {NewEvent}
in
thread
{System.showInfo "[2] Waiting for event..."}
{WaitEvent E}
{System.showInfo "[2] Received event."}
end
{System.showInfo "[1] Waiting 1 second..."}
{Delay 1000}
{System.showInfo "[1] Signaling event."}
{SignalEvent E}

View file

@ -0,0 +1,13 @@
declare
E
in
thread
{System.showInfo "[2] Waiting for event..."}
{Wait E}
{System.showInfo "[2] Received event."}
end
{System.showInfo "[1] Waiting 1 second..."}
{Delay 1000}
{System.showInfo "[1] Signaling event."}
E = unit

View file

@ -0,0 +1,20 @@
declare
MyPort
in
thread
MyStream
in
{NewPort ?MyStream ?MyPort}
{System.showInfo "[2] Waiting for event..."}
for Event in MyStream do
{System.showInfo "[2] Received event."}
{System.showInfo "[2] Waiting for event again..."}
end
end
for do
{System.showInfo "[1] Waiting 1 second..."}
{Delay 1000}
{System.showInfo "[1] Signaling event."}
{Port.send MyPort unit}
end