aboutsummaryrefslogtreecommitdiffstats
path: root/scheduler.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve IO::Buffer resize and introduce ownership transfer.Samuel Williams2021-12-201-0/+2
|
* IO::Buffer for scheduler interface.Samuel Williams2021-11-101-7/+42
|
* Add gvl and fiber assertions to scheduler interface to catch invalid usage.Samuel Williams2021-09-201-0/+9
|
* Add alternative optional hook for `scheduler_close` to allow public usage of ↵Samuel Williams2021-09-201-3/+9
| | | | close.
* Adjust styles [ci skip]Nobuyoshi Nakada2021-06-171-1/+2
| | | | | | | | | * --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
* Fixed method names in exception messagesNobuyoshi Nakada2021-06-141-4/+4
| | | | | These methods are not !-suffixed, and the messages were very confusing.
* Wake up join list within thread EC context. (#4471)Samuel Williams2021-06-141-0/+24
| | | | | | | | | | | | | | | * 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.
* Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)Samuel Williams2021-06-141-0/+14
| | | Co-authored-by: Bruno Sutic <code@brunosutic.com>
* Disable public interface for now.Samuel Williams2021-03-301-12/+14
|
* Update method name and add documentation.Samuel Williams2021-03-301-6/+7
|
* Fix native implementation.Samuel Williams2021-03-301-2/+11
| | | | | # Conflicts: # scheduler.c
* Fixed a compilation errorNobuyoshi Nakada2021-03-301-1/+1
|
* Prefer `rb_check_funcall`.Samuel Williams2021-03-301-1/+1
|
* Add hook for `Timeout.timeout`.Samuel Williams2021-03-301-0/+8
|
* strip trailing spaces [ci skip]Nobuyoshi Nakada2021-02-091-2/+2
|
* Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams2021-02-091-45/+39
| | | | | | | | | * Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking.
* Add support for non-blocking `Process.wait`.Samuel Williams2020-12-091-0/+14
|
* Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada2020-12-051-2/+2
|
* Rename to `Fiber#set_scheduler`.Samuel Williams2020-11-071-0/+49
|
* Added a fallback returnNobuyoshi Nakada2020-10-011-0/+2
|
* break around function definition [ci skip]Nobuyoshi Nakada2020-10-011-13/+26
|
* Don't call `Scheduler#close` if it doesn't exist.Samuel Williams2020-10-011-1/+3
|
* Make `Thread#join` non-blocking.Samuel Williams2020-09-211-2/+2
|
* When setting current thread scheduler to nil, invoke `#close`.Samuel Williams2020-09-211-2/+15
|
* Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock}Benoit Daloze2020-09-171-8/+8
| | | | * Move #kernel_sleep next to #block as it is similar
* Make Mutex per-Fiber instead of per-ThreadBenoit Daloze2020-09-141-0/+14
| | | | | | | | | * 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]
* Add support for hooking `IO#read`.Samuel Williams2020-09-141-4/+14
|
* Standardised scheduler interface.Samuel Williams2020-09-141-0/+71