File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,13 @@ plan 14;
33
33
is $ c . closed. cause. message, " oh noes" , " failure reason conveyed" ;
34
34
}
35
35
36
- # ?rakudo skip 'disappears'
37
36
{
38
37
my $ p = Supply . for (1 .. 5 );
39
- is ~ $ p . Channel . list, " 1 2 3 4 5" , " Publish .for and .Channel work" ;
38
+ is ~ $ p . Channel . list, " 1 2 3 4 5" , " Supply .for and .Channel work" ;
40
39
}
41
40
42
- # ?rakudo skip 'disappears '
41
+ # ?rakudo skip 'hangs '
43
42
{
44
43
my $ p = Supply . for (1 .. 5 );
45
- is ~ @ ($ p . Channel ), " 1 2 3 4 5" , " Publish .for and @(.Channel) work" ;
44
+ is ~ @ ($ p . Channel ), " 1 2 3 4 5" , " Supply .for and @(.Channel) work" ;
46
45
}
Original file line number Diff line number Diff line change 8
8
9
9
my @ vals ;
10
10
my $ saw_done ;
11
- my $ tap = $ p . tap (
12
- -> $ val { @ vals . push ($ val ) },
13
- { $ saw_done = True });
11
+ my $ tap = $ p . tap ( -> $ val { @ vals . push ($ val ) },
12
+ done => { $ saw_done = True });
14
13
15
14
$ p . more(1 );
16
15
is ~ @ vals , " 1" , " Tap got initial value" ;
@@ -48,15 +47,13 @@ plan 16;
48
47
my $ p = Supply . for (1 .. 10 , : scheduler(CurrentThreadScheduler ));
49
48
50
49
my @ a1 ;
51
- my $ tap1 = $ p . tap (
52
- -> $ val { @ a1 . push ($ val ) },
53
- { @ a1 . push (" end" ) });
50
+ my $ tap1 = $ p . tap ( -> $ val { @ a1 . push ($ val ) },
51
+ done => { @ a1 . push (" end" ) });
54
52
is ~ @ a1 , " 1 2 3 4 5 6 7 8 9 10 end" , " Synchronous publish worked" ;
55
53
56
54
my @ a2 ;
57
- my $ tap2 = $ p . tap (
58
- -> $ val { @ a2 . push ($ val ) },
59
- { @ a2 . push (" end" ) });
55
+ my $ tap2 = $ p . tap ( -> $ val { @ a2 . push ($ val ) },
56
+ done => { @ a2 . push (" end" ) });
60
57
is ~ @ a2 , " 1 2 3 4 5 6 7 8 9 10 end" , " Second tap also gets all values" ;
61
58
}
62
59
You can’t perform that action at this time.
0 commit comments