2011-10-01から1ヶ月間の記事一覧
import std.stdio; import std.concurrency; void f() { writeln("start"); for (bool f; !f; receive( (int i) { f = true; }, (string s) { writeln(s); }, )) {} writeln("end"); } void main() { auto tid = spawn(&f); send(tid, "a"); write(readln())…