Age | Commit message (Collapse) | Author |
|
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.
Notes:
Merged: https://github.com/ruby/ruby/pull/3892
|
|
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.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3624
|
|
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)
Notes:
Merged: https://github.com/ruby/ruby/pull/3775
|
|
If a terminating ractor has child threads, then kill all child
threads.
Notes:
Merged: https://github.com/ruby/ruby/pull/3754
|
|
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.
Notes:
Merged: https://github.com/ruby/ruby/pull/3754
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3742
|
|
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]
Notes:
Merged: https://github.com/ruby/ruby/pull/3710
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3589
|
|
* Keep Ractor#recv/Ractor.recv as an alias for now.
Notes:
Merged: https://github.com/ruby/ruby/pull/3626
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3613
|
|
|
|
It's implementation is equivalent to:
Thread.current.scheduler unless Thread.current.blocking?
Notes:
Merged: https://github.com/ruby/ruby/pull/3610
|
|
|
|
* And not some list of sort.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3558
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3557
|
|
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.
|
|
signal can interrupt Ractor.select, but if there is no exception,
Ractor.select should restart automatically.
Notes:
Merged: https://github.com/ruby/ruby/pull/3534
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3434
|
|
* 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]
Notes:
Merged: https://github.com/ruby/ruby/pull/3434
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3434
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3434
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3531
|
|
pthread_mutex_lock.
It is possible for GC to run during initialisation due to objects being allocated
Notes:
Merged: https://github.com/ruby/ruby/pull/3510
|
|
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature #17100] to see the implementation details
and discussions.
[Feature #17100]
This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.
I hope this feature can help programmers from thread-safety issues.
Notes:
Merged: https://github.com/ruby/ruby/pull/3365
|
|
|
|
Correctly capture thread before releasing GVL and pass as argument to
`rb_thread_scheduler_if_nonblocking`.
Notes:
Merged: https://github.com/ruby/ruby/pull/3323
|
|
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
Notes:
Merged: https://github.com/ruby/ruby/pull/3247
|
|
Formerly, branch coverage measurement counters are generated for each
compilation traverse of the AST. However, ensure clause node is
traversed twice; one is for normal-exit case (the resulted bytecode is
embedded in its outer scope), and the other is for exceptional case (the
resulted bytecode is used in catch table). Two branch coverage counters
are generated for the two cases, but it is not desired.
This changeset revamps the internal representation of branch coverage
measurement. Branch coverage counters are generated only at the first
visit of a branch node. Visiting the same node reuses the
already-generated counter, so double counting is avoided.
Notes:
Merged: https://github.com/ruby/ruby/pull/3240
|
|
Don't use rb_check_id, which only works for pinned symbols.
Switch inadvertent creation test for thread_variable? to
only check for pinned symbols, same as thread_variable_get
and thread_variable_set.
Make key variable name in thread_local_set match
thread_local_get and thread_variable?.
Fixes [Bug #16906]
Notes:
Merged: https://github.com/ruby/ruby/pull/3145
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3032
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
|
|
To fix build failures.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
This shall fix compile errors.
Notes:
Merged: https://github.com/ruby/ruby/pull/3079
|
|
rb_uninterruptible() disables any interrupts using handle_interrupt
feature (This function is used by `p`).
After this function, pending interrupts should be checked correctly,
however there is no chance to setup interrupt flag of working
threads, it means that nobody checks pending interrupts.
For example, it ignores terminate signal delivered at the end
of main thread and program can't stop.
This patch set interrupt flag if there are pending interrupts.
|
|
Split ruby.h
Notes:
Merged-By: shyouhei <shyouhei@ruby-lang.org>
|
|
RB_NOGVL_UBF_ASYNC_SAFE is wrongly specified because flags
is not checked.
[Bug #15499] 23444302
|
|
This is a ruby method with arity zero. Which means, this function takes
one argument (that is self).
|
|
Function pointers are not void*. See also
ce4ea956d24eab5089a143bba38126f2b11b55b6
8427fca49bd85205f5a8766292dd893f003c0e48
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2814
|