diff options
author | Koichi Sasada <[email protected]> | 2020-11-11 01:55:28 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2020-11-11 18:10:43 +0900 |
commit | deed21bb08170431891b65fda26f4a3557c9ffd4 (patch) | |
tree | 2ab4f0cdf1c273f39759b0177be14285da1aad8b /ractor.c | |
parent | db31ace934e8b900e90853bd875f23195837b398 (diff) |
ignore yield_atexit if outgoing port is closed
If outgoing_port is closed, Ractor.yield never successes.
[Bug #17310]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3755
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1288,6 +1288,10 @@ ractor_create(rb_execution_context_t *ec, VALUE self, VALUE loc, VALUE name, VAL static void ractor_yield_atexit(rb_execution_context_t *ec, rb_ractor_t *cr, VALUE v, bool exc) { + if (cr->outgoing_port_closed) { + return; + } + ASSERT_ractor_unlocking(cr); struct rb_ractor_basket basket; |