Created
March 29, 2018 21:42
-
-
Save sargun/dc3e01db5320a6119768a2d663e7e69c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| proc waitForStuff(x : ptr Channel[int]) = | |
| let val = x.recv() | |
| echo format("hi: $#", val) | |
| proc setupBackground(q : Process) = | |
| var x : ptr Channel[int] | |
| spawn (waitForStuff(x)) | |
| x.open() | |
| x.send(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment