diff options
| -rw-r--r-- | .github/workflows/zjit-macos.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/zjit-ubuntu.yml | 2 | ||||
| -rw-r--r-- | doc/string/split.rdoc | 2 | ||||
| -rw-r--r-- | thread_pthread.c | 7 |
4 files changed, 10 insertions, 3 deletions
diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index 3340ba08a7..4921d9ef70 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -93,7 +93,7 @@ jobs: rustup install ${{ matrix.rust_version }} --profile minimal rustup default ${{ matrix.rust_version }} - - uses: taiki-e/install-action@7a79fe8c3a13344501c80d99cae481c1c9085912 # v2.81.10 + - uses: taiki-e/install-action@15449e3094499af05d8d964a1c884208e4b8b595 # v2.81.11 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 8fd1ef9b7a..30c6138466 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -125,7 +125,7 @@ jobs: ruby-version: '3.1' bundler: none - - uses: taiki-e/install-action@7a79fe8c3a13344501c80d99cae481c1c9085912 # v2.81.10 + - uses: taiki-e/install-action@15449e3094499af05d8d964a1c884208e4b8b595 # v2.81.11 with: tool: nextest@0.9 if: ${{ matrix.test_task == 'zjit-check' }} diff --git a/doc/string/split.rdoc b/doc/string/split.rdoc index 8679149003..dc6292d182 100644 --- a/doc/string/split.rdoc +++ b/doc/string/split.rdoc @@ -68,7 +68,7 @@ and trailing empty strings are included: When +limit+ is negative, there is no limit on the size of the array, -and trailing empty strings are omitted: +and trailing empty strings are included: 'abracadabra'.split('', -1) # => ["a", "b", "r", "a", "c", "a", "d", "a", "b", "r", "a", ""] 'abracadabra'.split('a', -1) # => ["", "br", "c", "d", "br", ""] diff --git a/thread_pthread.c b/thread_pthread.c index 5b5329fd21..44a3ce4270 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -866,6 +866,13 @@ thread_sched_wait_running_turn(struct rb_thread_sched *sched, rb_thread_t *th, b thread_sched_set_running(sched, th); rb_ractor_thread_switch(th->ractor, th, false); } + else if (th == sched->runnable_hot_th) { + // The hot thread cannot steal the control (e.g. the running thread + // is an MN thread). It is going to sleep, so it is no longer spinning; + // drop the hint so that other threads don't yield the lock to it. + sched->runnable_hot_th = NULL; + sched->runnable_hot_th_waiting = 0; + } // already deleted from running threads // VM_ASSERT(!ractor_sched_running_threads_contain_p(th->vm, th)); // need locking |
