Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel.send prone to race conditions #3614

Open
p6rt opened this issue Dec 19, 2014 · 1 comment
Open

Channel.send prone to race conditions #3614

p6rt opened this issue Dec 19, 2014 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 19, 2014

Migrated from rt.perl.org#123461 (status was 'new')

Searchable as RT123461$

@p6rt
Copy link
Author

p6rt commented Dec 19, 2014

From @moritz

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.

@p6rt p6rt added the conc label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant