You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to http://doc.perl6.org/language/concurrency#Channels, "[b]ecause looping over a channel in this manner [with $channel.poll and $channel.closed] is a common pattern there is a simpler functional syntax to do this", namely the "loop-earliest-more" syntax. The wording make it sound as both syntaxes should be equivalent.
However, the "loop-earliest-more" syntax results in an unwanted shared state between Class instances, while the classic syntax does not exhibit this problem.
It looks like there is a problem with closure on one of those blocks on the earliest, it looks like earliest is going to be removed at some point so I'll remove the earliest bit from the doc and do a better example using react
According to http://doc.perl6.org/language/concurrency#Channels, "[b]ecause looping over a channel in this manner [with $channel.poll and $channel.closed] is a common pattern there is a simpler functional syntax to do this", namely the "loop-earliest-more" syntax. The wording make it sound as both syntaxes should be equivalent.
However, the "loop-earliest-more" syntax results in an unwanted shared state between Class instances, while the classic syntax does not exhibit this problem.
See short runnable and commented code examples: https://gist.github.com/nxadm/6d867ad7410330d1bfac
This bug is reported here to know if this different behaviour should be documented (a feature ;) ) or just a bug.
Thank you,
C.
The text was updated successfully, but these errors were encountered: