Age | Commit message (Collapse) | Author |
|
to prevent the following failure on `make test-all --repeat-count=2`
http://ci.rvm.jp/results/trunk-repeat20-asserts@phosphorus-docker/3957774
```
1) Error:
TestFiberScheduler#test_autoload:
NameError: uninitialized constant TestFiberSchedulerAutoload
Object.const_get(:TestFiberSchedulerAutoload)
^^^^^^^^^^
```
|
|
Object#autoload implements a custom per-thread "mutex" for blocking
threads waiting on autoloading a feature. This causes problems when used
with the fiber scheduler. We swap the implementation to use a Ruby mutex
which is fiber aware.
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
In a forked process from a fiber, the fiber becomes the only
fiber, `fiber_switch` does nothing as there is no other fibers,
`rb_fiber_terminate` does not terminate the fiber. In that case,
reaches the end of `fiber_entry` finaly, which is declared as
"COROUTINE" and should never return.
Notes:
Merged: https://github.com/ruby/ruby/pull/5468
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
I got the warning while running "make test-all":
Leaked file descriptor: TestFiberIOBuffer#test_write_nonblock: 9 : #<UNIXSocket:fd 9>
Closed file descriptor: TestFiberIOBuffer#test_read_write_blocking: 9
Leaked file descriptor: TestFiberIOBuffer#test_timeout_after: 10 : #<UNIXSocket:fd 10>
Closed file descriptor: TestFiberIOBuffer#test_read_nonblock: 10
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5287
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
As this warning is emitted just once per processes, needs in each
files when parallel testing.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4621
|
|
close.
Notes:
Merged: https://github.com/ruby/ruby/pull/4658
|
|
There were two issues:
1. When an IO object is waiting for writablility only (as in test_tcp_accept) the selected hash is empty.
Therefore selected[fiber] returns nil but needs to default to 0 in order to be or'ed with IO::WRITABLE.
2. When an IO object is waiting for read- or writability (as in test_tcp_connect), but only one of these
two events arrive, the Fiber and IO object need to be removed from the other `@readable` or `@writable` list.
Notes:
Merged: https://github.com/ruby/ruby/pull/4777
|
|
If the thread termination invokes user code after `th->status` becomes
`THREAD_KILLED`, and the user unblock function causes that `th->status` to
become something else (e.g. `THREAD_RUNNING`), threads waiting in
`thread_join_sleep` will hang forever. We move the unblock function call
to before the thread status is updated, and allow threads to join as soon
as `th->value` becomes defined.
This reverts commit 6505c77501f1924571b2fe620c5c7b31ede0cd22.
Notes:
Merged: https://github.com/ruby/ruby/pull/4689
|
|
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.
|
|
If the thread termination invokes user code after `th->status` becomes
`THREAD_KILLED`, and the user unblock function causes that `th->status` to
become something else (e.g. `THREAD_RUNNING`), threads waiting in
`thread_join_sleep` will hang forever. We move the unblock function call
to before the thread status is updated, and allow threads to join as soon
as `th->value` becomes defined.
Notes:
Merged: https://github.com/ruby/ruby/pull/4660
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4571
|
|
* 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>
|
|
Co-authored-by: Bruno Sutic <code@brunosutic.com>
Notes:
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4338
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4173
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4173
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4173
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4173
|
|
* 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 <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3971
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3971
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3853
|
|
* Now that it works correctly.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3743
|
|
duration is nil.
Notes:
Merged: https://github.com/ruby/ruby/pull/3743
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3742
|
|
|
|
|
|
It's implementation is equivalent to:
Thread.current.scheduler unless Thread.current.blocking?
Notes:
Merged: https://github.com/ruby/ruby/pull/3610
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3612
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3612
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3605
|
|
|
|
|
|
|
|
* This shows block() with a timeout is similar to #kernel_sleep and also
does not need to change `@blocking`.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3558
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3557
|
|
* 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().
|
|
* To still remove the lock from the Thread's list of acquired locks.
* Also to not wake up other waiters and preserve blocking behavior.
|
|
* It would hit "[BUG] unexpected THREAD_STOPPED" before.
|
|
|
|
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.
|