Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Channel.close
it did not immediately fulfill the .closed promise if $!queue was empty
  • Loading branch information
moritz committed Feb 7, 2015
1 parent bf3e3ab commit 3f9508c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Channel.pm
Expand Up @@ -103,6 +103,9 @@ my class Channel {
method close() {
$!closed = 1;
nqp::push($!queue, CHANNEL_CLOSE);
# if $!queue is otherwise empty, make sure that $!closed_promise
# learns about the new value
self!peek();
Nil
}

Expand Down

0 comments on commit 3f9508c

Please sign in to comment.