Spencer Salazarnew testing framework3e7be8b13 years agoHistory
31 lines · 482 B · Text
RawDownload
// 52.ck : one event, many shreds // the eventEvent e; // event to say hifun int hi( Event e, string id ){    while( true )    {        // wait on event        e => now;        // print the id        <<<id>>>;    }} // sporkspork ~ hi( e, "yo" );spork ~ hi( e, "hi" );spork ~ hi( e, "hello" );spork ~ hi( e, "hey come back here!" ); // infinite time loopwhile( true ){    // advance time    1::second => now;    // signal one waiting shred    e.signal();}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t