summaryrefslogtreecommitdiff
path: root/scheduler.c
AgeCommit message (Collapse)Author
16 hoursFix blocking operation cancellation. (#13614)Samuel Williams
Expose `rb_thread_resolve_unblock_function` internally. Notes: Merged-By: ioquatix <[email protected]>
4 daysFix handling of cancelled blocking operations. (#13570)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
8 daysBe more specific with `RUBY_VM_INTERRUPTED` in debug assertions.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/13547
8 daysLog `ec->interrupt_flag` if non-zero.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/13543
9 daysFix `blocking_operation_wait` use-after-free bug.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/13437
9 days`rb_io_blocking_operation_exit` should not execute with pending interrupts.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/13437
12 daysFix compatibility with fiber schedulers that don't implement ↵Samuel Williams
`#fiber_interrupt`. (#13492) Notes: Merged-By: ioquatix <[email protected]>
2025-05-23Allow `IO#close` to interrupt IO operations on fibers using ↵Samuel Williams
`fiber_interrupt` hook. (#12839) Notes: Merged-By: ioquatix <[email protected]>
2025-02-25Prefer `0.000001` over `0.000001f` for timeout calculations. (#12803)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2025-01-15Preserve `errno` in `rb_fiber_scheduler_unblock`. (#12576)Samuel Williams
[Bug #21038] Co-authored-by: Julian Scheid <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2024-12-13[DOC] Have RDoc pick up Fiber::Scheduler#blocking_operation_waitAlan Wu
... and list it.
2024-11-20Update `scheduler.c` to use `RUBY_ASSERT`. (#12129)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2024-11-20Introduce `Fiber::Scheduler#blocking_operation_wait`. (#12016)Samuel Williams
Redirect `rb_nogvl` blocking operations to the fiber scheduler if possible to prevent stalling the event loop. [Feature #20876] Notes: Merged-By: ioquatix <[email protected]>
2024-11-06Revert "Introduce Fiber Scheduler `blocking_region` hook. (#11963)" (#12013)Samuel Williams
This reverts some of commit 87fb44dff6409a19d12052cf0fc07ba80a4c45ac. We will rename and propose a slightly different interface. Notes: Merged-By: ioquatix <[email protected]>
2024-10-31Introduce Fiber Scheduler `blocking_region` hook. (#11963)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2024-02-22Fix exception handling in `rb_fiber_scheduler_set`. (#10042)Samuel Williams
2023-09-10[DOC] Fix method docs of scheduler#io_read and scheduler#io_writekudojp
Each of Fiber::Scheduler#io_read and io_write takes the "offset" as the fourth argument, which is not doucmented. Notes: Merged: https://github.com/ruby/ruby/pull/8407
2023-03-31Support `IO#pread` / `IO#pwrite` using fiber scheduler. (#7594)Samuel Williams
* Skip test if non-blocking file IO is not supported. Notes: Merged-By: ioquatix <[email protected]>
2023-03-25Fix incorrect usage of `rb_fiber_scheduler_io_(p)(read|write)`. (#7593)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-12-24[DOC] Document new methods of IO::Buffer and Fiber::Scheduler (#7016)Victor Shepelev
Co-authored-by: Samuel Williams <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2022-11-16Using UNDEF_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6721
2022-10-15Update `Fiber::Scheduler` documentation. (#6562)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-10-15Introduce `Fiber::Scheduler#io_select` hook for non-blocking `IO.select`. ↵Samuel Williams
(#6559) Notes: Merged-By: ioquatix <[email protected]>
2022-10-12Improvements to IO::Buffer implementation and documentation. (#6525)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-10-07Add IO#timeout attribute and use it for blocking IO operations. (#5653)Samuel Williams
Notes: Merged-By: ioquatix <[email protected]>
2022-09-08[Bug #5317] Use `rb_off_t` instead of `off_t`Nobuyoshi Nakada
Get rid of the conflict with system-provided small `off_t`. Notes: Merged: https://github.com/ruby/ruby/pull/6329
2021-12-23Add fiber scheduler hooks for `pread`/`pwrite`, and add support to `IO::Buffer`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5249 Merged-By: ioquatix <[email protected]>
2021-12-21Rename IMMUTABLE to READONLY.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5303
2021-12-20Improve IO::Buffer resize and introduce ownership transfer.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5301
2021-11-10IO::Buffer for scheduler interface.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4621
2021-09-20Add gvl and fiber assertions to scheduler interface to catch invalid usage.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4656
2021-09-20Add alternative optional hook for `scheduler_close` to allow public usage of ↵Samuel Williams
close. Notes: Merged: https://github.com/ruby/ruby/pull/4658
2021-06-17Adjust styles [ci skip]Nobuyoshi Nakada
* --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
2021-06-14Fixed method names in exception messagesNobuyoshi Nakada
These methods are not !-suffixed, and the messages were very confusing.
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 <[email protected]>
2021-06-14Add scheduler hook `Addrinfo.getaddrinfo`. (#4375)Samuel Williams
Co-authored-by: Bruno Sutic <[email protected]> Notes: Merged-By: ioquatix <[email protected]>
2021-03-30Disable public interface for now.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Update method name and add documentation.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Fix native implementation.Samuel Williams
# Conflicts: # scheduler.c Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Fixed a compilation errorNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Prefer `rb_check_funcall`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-03-30Add hook for `Timeout.timeout`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4173
2021-02-09strip trailing spaces [ci skip]Nobuyoshi Nakada
2021-02-09Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams
* 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. Notes: Merged-By: ioquatix <[email protected]>
2020-12-09Add support for non-blocking `Process.wait`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3853
2020-12-05Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada
2020-11-07Rename to `Fiber#set_scheduler`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3742
2020-10-01Added a fallback returnNobuyoshi Nakada
2020-10-01break around function definition [ci skip]Nobuyoshi Nakada
2020-10-01Don't call `Scheduler#close` if it doesn't exist.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3612