1.2.23. test/regress/rt-1.01.23
Warning: result is dependent on implementation
detail (order of execution after read/write matchup)
1: #line 871 "./lpsrc/flx_regress.pak"
2:
3: #line 871 "./lpsrc/flx_regress.pak"
4:
Start felix section to test/regress/rt-1.01.23-0.flx[1
/1
]
5:
6:
7: var y = ();
8: proc f() { print "Hello"; endl; }
9: f y;
10:
11: var x = mk_schannel[unit]();
12:
13: proc reader() {
14: print "R1"; endl;
15: var &u:unit <- read x;
16: print "R2"; endl;
17: }
18:
19: proc writer() {
20: print "W1"; endl;
21: write (x,());
22: print "W2"; endl;
23: }
24:
25: spawn_fthread the reader;
26: spawn_fthread the writer;
27:
28: print "Done"; endl;
Start data section to test/regress/rt-1.01.23-0.expect[1
/1
]
1: Hello
2: Done
3: W1
4: R1
5: R2
6: W2
1: #line 907 "./lpsrc/flx_regress.pak"
2:
3: #line 907 "./lpsrc/flx_regress.pak"
4:
Start felix section to test/regress/rt-1.01.23-1.flx[1
/1
]
5:
6: open Control;
7:
8: var chin,chout = mk_ioschannel_pair[int] ();
9:
10: spawn_fthread {
11: var x = 1;
12: whilst x <= 10 do
13: write$ chout,x;
14: ++x;
15: done;
16: };
17:
18: spawn_fthread {
19: var x = 1;
20: whilst x < 10 do
21: read$ &x,chin; print x; endl;
22: done;
23: };
Start data section to test/regress/rt-1.01.23-1.expect[1
/1
]
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10