Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add verbose nil in testing | Delton Ding | 2020-12-23 | 1 | -0/+1 |
| | |||||
* | Enable `Fiber.current` and `Fiber#alive?` call inside ractor | Delton Ding | 2020-12-23 | 1 | -0/+22 |
| | |||||
* | Add support for non-blocking `Process.wait`. | Samuel Williams | 2020-12-09 | 2 | -0/+43 |
| | |||||
* | Fix TestFiberMutex#test_condition_variable assertion | Benoit Daloze | 2020-11-08 | 1 | -5/+3 |
| | | | | * Now that it works correctly. | ||||
* | Urgent notification pipe has same lifetime as scheduler. | Samuel Williams | 2020-11-08 | 1 | -11/+10 |
| | |||||
* | Defer `kernel_sleep` to `block` to avoid exiting the event loop when ↵ | Samuel Williams | 2020-11-08 | 1 | -6/+1 |
| | | | | duration is nil. | ||||
* | Rename to `Fiber#set_scheduler`. | Samuel Williams | 2020-11-07 | 6 | -22/+38 |
| | |||||
* | Refined assertions for better failure messages | Nobuyoshi Nakada | 2020-10-01 | 1 | -4/+4 |
| | |||||
* | strip trailing spaces [ci skip] | Nobuyoshi Nakada | 2020-10-01 | 1 | -1/+1 |
| | |||||
* | Remove `Thread.scheduler` from public interface. | Samuel Williams | 2020-10-01 | 1 | -7/+6 |
| | | | | | | It's implementation is equivalent to: Thread.current.scheduler unless Thread.current.blocking? | ||||
* | Raise an exception if the scheduler was already closed. | Samuel Williams | 2020-10-01 | 1 | -0/+2 |
| | |||||
* | Don't call `Scheduler#close` if it doesn't exist. | Samuel Williams | 2020-10-01 | 1 | -0/+8 |
| | |||||
* | Fix order of operations during `rb_ec_finalize`. | Samuel Williams | 2020-09-30 | 1 | -0/+14 |
| | |||||
* | Remove unnecessary executable bit [ci skip] | Kazuhiro NISHIYAMA | 2020-09-28 | 1 | -0/+0 |
| | |||||
* | test/fiber/scheduler.rb: Prevent "instance variable @urgent not initialized" | Yusuke Endoh | 2020-09-24 | 1 | -0/+2 |
| | |||||
* | strip trailing spaces [ci skip] | Nobuyoshi Nakada | 2020-09-23 | 1 | -1/+1 |
| | |||||
* | Simplify the implementation of Scheduler#block | Benoit Daloze | 2020-09-21 | 1 | -13/+15 |
| | | | | | * This shows block() with a timeout is similar to #kernel_sleep and also does not need to change `@blocking`. | ||||
* | Make `Thread#join` non-blocking. | Samuel Williams | 2020-09-21 | 1 | -6/+16 |
| | |||||
* | When setting current thread scheduler to nil, invoke `#close`. | Samuel Williams | 2020-09-21 | 2 | -0/+40 |
| | |||||
* | Remove from waiter in Mutex#lock with ensure when calling rb_scheduler_block() | Benoit Daloze | 2020-09-20 | 1 | -0/+32 |
| | | | | | * Previously this could lead to an invalid waiter entry and then trying to wake up that waiter would result in various issues in rb_mutex_unlock_th(). | ||||
* | Add missing goto found; | Benoit Daloze | 2020-09-17 | 1 | -1/+2 |
| | | | | | * To still remove the lock from the Thread's list of acquired locks. * Also to not wake up other waiters and preserve blocking behavior. | ||||
* | Fix Mutex#unlock with a scheduler and thread contention | Benoit Daloze | 2020-09-17 | 1 | -0/+23 |
| | | | | * It would hit "[BUG] unexpected THREAD_STOPPED" before. | ||||
* | Document the various scheduler hooks | Benoit Daloze | 2020-09-17 | 1 | -0/+3 |
| | |||||
* | Call scheduler.block instead of scheduler.kernel_sleep for blocking ↵ | Benoit Daloze | 2020-09-17 | 2 | -1/+27 |
| | | | | | | | Queue/SizedQueue operations * scheduler.unblock was already already called before but with no corresponding scheduler.block * add test that Queue#pop makes the scheduler wait until it gets an element. | ||||
* | Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock} | Benoit Daloze | 2020-09-17 | 1 | -12/+15 |
| | | | | * Move #kernel_sleep next to #block as it is similar | ||||
* | Use a similar pattern for waiting and ready | Benoit Daloze | 2020-09-17 | 1 | -4/+3 |
| | |||||
* | Add a note at the top of the test scheduler | Benoit Daloze | 2020-09-16 | 1 | -0/+4 |
| | |||||
* | Add support for Queue & SizedQueue. | Samuel Williams | 2020-09-14 | 1 | -0/+31 |
| | |||||
* | Add support for ConditionVariable. | Samuel Williams | 2020-09-14 | 2 | -1/+40 |
| | |||||
* | Improve handling of urgent notification pipe. | Samuel Williams | 2020-09-14 | 1 | -14/+12 |
| | |||||
* | Make Mutex per-Fiber instead of per-Thread | Benoit Daloze | 2020-09-14 | 2 | -7/+77 |
| | | | | | | | | | * Enables Mutex to be used as synchronization between multiple Fibers of the same Thread. * With a Fiber scheduler we can yield to another Fiber on contended Mutex#lock instead of blocking the entire thread. * This also makes the behavior of Mutex consistent across CRuby, JRuby and TruffleRuby. * [Feature #16792] | ||||
* | Rename `Fiber{}` to `Fiber.schedule{}`. | Samuel Williams | 2020-09-14 | 5 | -11/+11 |
| | |||||
* | Standardised scheduler interface. | Samuel Williams | 2020-09-14 | 3 | -76/+2 |
| | |||||
* | Simplify bitmasks for IO events. | Samuel Williams | 2020-09-14 | 1 | -2/+2 |
| | |||||
* | test/fiber/test_backtrace.rb: prevent a warning | Yusuke Endoh | 2020-08-18 | 1 | -2/+2 |
| | | | | | | | | | | | ``` /home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:9: warning: ambiguous first argument; put parentheses or a space even after `/' operator /home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:15: warning: ambiguous first argument; put parentheses or a space even after `/' operator ``` | ||||
* | Expose ec -> backtrace (internal) and use it to implement fiber backtrace. | Samuel Williams | 2020-08-18 | 1 | -0/+22 |
| | | | | See <https://bugs.ruby-lang.org/issues/16815> for more details. | ||||
* | Suppress "assigned but unused variable" warnings | Yusuke Endoh | 2020-07-23 | 1 | -2/+2 |
| | |||||
* | Remove trailing spaces [ci skip] | Nobuyoshi Nakada | 2020-07-20 | 1 | -2/+2 |
| | |||||
* | Add multi-threaded I/O test. | Samuel Williams | 2020-07-20 | 1 | -0/+23 |
| | |||||
* | Improve consistency of tests. | Samuel Williams | 2020-07-20 | 3 | -5/+13 |
| | |||||
* | Remove fiber HTTP test. | Samuel Williams | 2020-07-16 | 1 | -28/+0 |
| | | | | | | The HTTP test hits a remote website which isn't always available and is not self-contained. Ideally we will rewrite this test with an internal web server. | ||||
* | Close sockets if blocking to fix leaked fds | Nobuyoshi Nakada | 2020-07-15 | 1 | -1/+7 |
| | |||||
* | Improved assertions | Nobuyoshi Nakada | 2020-06-09 | 1 | -2/+2 |
| | |||||
* | Return seconds slept after Thread.scheduler wait_sleep | nicholas a. evans | 2020-06-09 | 1 | -1/+18 |
| | | | | | | Kernel#sleep should still return seconds slept, even when using a Thread.scheduler. The return value of Scheduler#wait_sleep can be ignored. | ||||
* | Fixup d48c92aa04ffd3a1cecef599eaa5e4409aab2fe4 | Hiroshi SHIBATA | 2020-05-23 | 1 | -1/+1 |
| | |||||
* | Rename TestScheduler* to TestFiber for convention of the test directory | Hiroshi SHIBATA | 2020-05-23 | 6 | -6/+6 |
| | |||||
* | Move `test/scheduler` -> `test/fiber` [Bug #16892][ruby-core:98366]. | Samuel Williams | 2020-05-15 | 8 | -0/+428 |