diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-31 07:00:38 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-31 07:00:38 +0000 |
commit | 528de2c977437085d5216ce86d95953fe02f99c1 (patch) | |
tree | 744d11534cfc0b523b9f2b6b0de76918a5523922 /thread_sync.c | |
parent | 5d0c4376c9ea925b814ab4082bb02dd7d93cc6ef (diff) | |
download | ruby-528de2c977437085d5216ce86d95953fe02f99c1.tar.gz |
allow Queue operation in trap.
* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
[Bug #12405]
* test/thread/test_queue.rb: add a test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c index ce280cea1a..152995fac0 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -773,7 +773,7 @@ queue_delete_from_waiting(struct waiting_delete *p) static VALUE queue_sleep(VALUE arg) { - rb_thread_sleep_deadly(); + rb_thread_sleep_deadly_allow_spurious_wakeup(); return Qnil; } |