mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Always run rb_thread_schedule_limits when Ractors
rb_thread_alone only checks the current ractor for other threads. If we are in multi-ractor mode we are guaranteed to have multiple threads. Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
This commit is contained in:
parent
30e1d6b5a8
commit
272e50a6f3
1 changed files with 1 additions and 1 deletions
2
thread.c
2
thread.c
|
@ -1461,7 +1461,7 @@ rb_thread_sleep(int sec)
|
||||||
static void
|
static void
|
||||||
rb_thread_schedule_limits(uint32_t limits_us)
|
rb_thread_schedule_limits(uint32_t limits_us)
|
||||||
{
|
{
|
||||||
if (!rb_thread_alone()) {
|
if (!rb_thread_alone() || rb_multi_ractor_p()) {
|
||||||
rb_thread_t *th = GET_THREAD();
|
rb_thread_t *th = GET_THREAD();
|
||||||
RUBY_DEBUG_LOG("us:%u", (unsigned int)limits_us);
|
RUBY_DEBUG_LOG("us:%u", (unsigned int)limits_us);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue