mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread_pthread.c: trigger THREAD_EVENT_READY when going throuhg the fast path.
This commit is contained in:
parent
bdc6e991f5
commit
19c6aaca93
Notes:
git
2022-06-08 01:16:24 +09:00
1 changed files with 4 additions and 4 deletions
|
@ -377,6 +377,10 @@ thread_sched_to_ready_common(struct rb_thread_sched *sched, rb_thread_t *th)
|
|||
static void
|
||||
thread_sched_to_running_common(struct rb_thread_sched *sched, rb_thread_t *th)
|
||||
{
|
||||
if (rb_internal_thread_event_hooks) {
|
||||
rb_thread_execute_hooks(RUBY_INTERNAL_THREAD_EVENT_READY);
|
||||
}
|
||||
|
||||
if (sched->running) {
|
||||
VM_ASSERT(th->unblock.func == 0 &&
|
||||
"we must not be in ubf_list and GVL readyq at the same time");
|
||||
|
@ -384,10 +388,6 @@ thread_sched_to_running_common(struct rb_thread_sched *sched, rb_thread_t *th)
|
|||
// waiting -> ready
|
||||
thread_sched_to_ready_common(sched, th);
|
||||
|
||||
if (rb_internal_thread_event_hooks) {
|
||||
rb_thread_execute_hooks(RUBY_INTERNAL_THREAD_EVENT_READY);
|
||||
}
|
||||
|
||||
// wait for running chance
|
||||
do {
|
||||
if (!sched->timer) {
|
||||
|
|
Loading…
Add table
Reference in a new issue