diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-07-28 11:05:36 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-07-28 11:05:36 +0900 |
commit | 6505c77501f1924571b2fe620c5c7b31ede0cd22 (patch) | |
tree | 3dd62e955ab1a073aac6677df50f96d27c3b32b1 /test/fiber/scheduler.rb | |
parent | 4fc9ddd7b6af54abf88d702c2e11e97ca7750ce3 (diff) |
Revert "Fix potential hang when joining threads."
This reverts commit 13f8521c630a15c87398dee0763e95f59c032a94.
http://rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20210727T230009Z.fail.html.gz
http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210728T000009Z.fail.html.gz
This revert is to confirm whether the commit is the cause.
If the failures consistently occur after this revert, I'll
reintroduce the commit.
Diffstat (limited to 'test/fiber/scheduler.rb')
-rw-r--r-- | test/fiber/scheduler.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/test/fiber/scheduler.rb b/test/fiber/scheduler.rb index 2785561000..af64e4ebb6 100644 --- a/test/fiber/scheduler.rb +++ b/test/fiber/scheduler.rb @@ -112,10 +112,8 @@ class Scheduler self.run ensure - if @urgent - @urgent.each(&:close) - @urgent = nil - end + @urgent.each(&:close) + @urgent = nil @closed = true @@ -242,13 +240,3 @@ class BrokenUnblockScheduler < Scheduler raise "Broken unblock!" end end - -class SleepingUnblockScheduler < Scheduler - # This method is invoked when the thread is exiting. - def unblock(blocker, fiber) - super - - # This changes the current thread state to `THREAD_RUNNING` which causes `thread_join_sleep` to hang. - sleep(0.1) - end -end |