| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* Some code replace and using RBOOL macro
* Fix indent
* Using RBOOL in syserr_eqq function
|
|
|
|
|
| |
This commit removes usages of rb_gc_force_recycle since it is a burden
to maintain and makes changes to the GC difficult.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Make Coverage suspendable
Add `Coverage.suspend`, `Coverage.resume` and some methods.
[Feature #18176] [ruby-core:105321]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
| |
Raise `NotImplementedError` on unsupported platforms regardless
the argument consistently.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The kill/terminate interrupts are internally handled not as Exception
instances, but as integers. So using Exception doesn't handle these
interrupts, but Object does. You can use Integer if you only want to
handle kill/terminate interrupts, but that's probably more of an
implementation detail, while handling Object should work regardless
of the implementation.
Fixes [Bug #15735]
|
| |
|
|
|
|
|
| |
Defer making ractor stdio until ractor started.
Before ractor started, created objects belong to the caller ractor
instead of the created ractor.
|
|
|
|
|
|
|
|
| |
Thread's are assigned a group at initialization, and no API exists
for them to unassign them from a group without assigning them to
another group.
Fixes [Bug #17505]
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
other ractors should not have a unblock thread.
This patch fixes 6f727853cee41195b67ee5d793c1ac23fe1a6ae0.
|
|
|
|
|
|
| |
vm->ubf_async_safe is VM global resource and only main thread
can manipulate it.
[Bug #17482]
|
|
|
|
|
|
|
| |
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
|
|
|
|
| |
to reset main ractor at fork().
|
|
|
|
|
|
| |
This reverts commit 0dd4896175f95c4c2a26d91a97b9fcb9a74cc0c6.
It breaks the tests on RUBY_DEBUG=1.
|
| |
|
|
|
|
| |
Catch up recent changes on USE_RUBY_DEBUG_LOG=1.
|
|
|
|
| |
pCMC doesn't have negative method cache so this patch implements it.
|
|
|
|
|
|
|
|
|
| |
Thread's interrupt set Ractor's wakeup_status as interrupted, but
the status remains next Ractor communication API. This patch makes
to ignore the previous interrupt state.
[Bug #17366]
Also this patch solves the Thread#kill and Ractor#take issues.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ractor's error will be printed if Thread#report_on_exception
is true (default), and error message is used. Without this patch,
the exception object is sent by Ractor.yield and it can be shared
with another ractor.
http://ci.rvm.jp/results/trunk-random3@phosphorus-docker/3269368
To prevent such sharing, show errors befor Ractor.yield().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(obj)
* rb_ractor_std*()
* rb_cRactor
and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
(to avoid conflict with include/ruby/ractor.h)
|
|
|
|
|
| |
If a terminating ractor has child threads, then kill all child
threads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timer function used on windows system set timer interrupt
flag of current main ractor's executing ec and thread can detect
the end of time slice. However, to set all ec->interrupt_flag for
all running ractors, it is requires to synchronize with other ractors.
However, timer thread can not acquire the ractor-wide lock because
of some limitation.
To solve this issue, this patch introduces USE_VM_CLOCK compile option
to introduce rb_vm_t::clock. This clock will be incremented by the
timer thread and each thread can check the incrementing by comparison
with previous checked clock. At last, on windows platform this patch
introduces some overhead, but I think there is no critical performance
issue because of this modification.
|
| |
|
|
|
|
|
| |
vm->waiting_fds is global resource so we need to lock it correctly.
(forgot to sync one place)
|
|
|
|
|
|
|
|
|
|
| |
Setting this to true disables the deadlock detector. It should
only be used in cases where the deadlock could be broken via some
external means, such as via a signal.
Now that $SAFE is no longer used, replace the safe_level_ VM flag
with ignore_deadlock for storing the setting.
Fixes [Bug #13768]
|