Created
June 16, 2011 19:03
-
-
Save eholk/1029972 to your computer and use it in GitHub Desktop.
Issue 507 test case
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
| use std; | |
| import std::task::join; | |
| fn grandchild(chan[int] c) { | |
| c <| 42; | |
| } | |
| fn child(chan[int] c) { | |
| auto _grandchild = spawn grandchild(c); | |
| join(_grandchild); | |
| } | |
| fn main() { | |
| let port[int] p = port(); | |
| auto _child = spawn child(chan(p)); | |
| let int x; | |
| p |> x; | |
| log x; | |
| assert(x == 42); | |
| join(_child); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment