Skip to content

Commit ec633ca

Browse files
authored
[6.d] Update output examples for sunk start
To match updated PoV and propspec: rakudo/rakudo@15c16e35ade24c6f0077 Raku/roast@9cf31a99c63a880596e68519999
1 parent 24e1691 commit ec633ca

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

doc/Type/Promise.pod6

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ thrown without any C<start> statement prefixes involved.
8181
=begin code
8282
use v6.d.PREVIEW;
8383
start { die }; sleep ⅓; say "hello";
84-
# OUTPUT: Died
85-
# in block at -e line 1
84+
# OUTPUT:
85+
# Unhandled exception in code scheduled on thread 4
86+
# Died
87+
# in block at -e line 1
8688
=end code
8789
8890
If you wish to avoid this behaviour, use C<start> in non-sink context or
@@ -99,9 +101,10 @@ catch the exception yourself:
99101
# OUTPUT: «caught␤hello␤»
100102
=end code
101103
102-
This behaviour exists only syntaxically and not as part of method L<sink>
103-
on L<Promise> object, thus sinking a L<Promise> object or having a C<start>
104-
block as return value of a routine won't trigger this behaviour.
104+
This behaviour exists only syntaxically, by using an alternate C<.sink> method
105+
for L<Promise> objects created by C<start> blocks in sink context, thus simply
106+
sinking a L<Promise> object that was created by other means won't trigger this
107+
behaviour.
105108
106109
=head2 method in
107110

0 commit comments

Comments
 (0)