summaryrefslogtreecommitdiff
path: root/test/fiber/test_sleep.rb
AgeCommit message (Collapse)Author
2021-06-15Close leaked file descriptorsNobuyoshi Nakada
2021-06-14Wake up join list within thread EC context. (#4471)Samuel Williams
* Wake up join list within thread EC context. * Consume items from join list so that they are not re-executed. If `rb_fiber_scheduler_unblock` raises an exception, it can result in a segfault if `rb_threadptr_join_list_wakeup` is not within a valid EC. This change moves `rb_threadptr_join_list_wakeup` into the thread's top level EC which initially caused an infinite loop because on exception will retry. We explicitly remove items from the thread's join list to avoid this situation. * Verify the required scheduler interface. * Test several scheduler hooks methods with broken `unblock` implementation. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2020-11-07Rename to `Fiber#set_scheduler`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3742
2020-09-14Rename `Fiber{}` to `Fiber.schedule{}`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-09-14Standardised scheduler interface.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-06-09Improved assertionsNobuyoshi Nakada
2020-06-09Return seconds slept after Thread.scheduler wait_sleepnicholas a. evans
Kernel#sleep should still return seconds slept, even when using a Thread.scheduler. The return value of Scheduler#wait_sleep can be ignored. Notes: Merged: https://github.com/ruby/ruby/pull/3198
2020-05-23Rename TestScheduler* to TestFiber for convention of the test directoryHiroshi SHIBATA
2020-05-15Move `test/scheduler` -> `test/fiber` [Bug #16892][ruby-core:98366].Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3110