# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #123461]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123461 >


This code in src/core/Channel.pm:

     method send(Channel:D: \item) {
         X::Channel::SendOnClosed.new.throw if $!closed;
         nqp::push($!queue, nqp::decont(item));
     }

Is prone to a race condition; after the 'if $!closed' check, another 
thread could close the channel, and either the item being pushed is 
silently lost, or things get added to the queue after it was closed.

See also http://irclog.perlgeek.de/perl6/2014-12-19#i_9831072 for some 
discussion.

Reply via email to