mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
sync vm->waiting_fds correctly.
vm->waiting_fds is global resource so we need to lock it correctly. (forgot to sync one place)
This commit is contained in:
parent
a1828a1ff4
commit
08ddc335ea
1 changed files with 7 additions and 1 deletions
8
thread.c
8
thread.c
|
@ -4504,7 +4504,13 @@ rb_thread_wait_for_single_fd(int fd, int events, struct timeval *timeout)
|
|||
} while (wait_retryable(&result, lerrno, to, end));
|
||||
}
|
||||
EC_POP_TAG();
|
||||
list_del(&wfd.wfd_node);
|
||||
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
list_del(&wfd.wfd_node);
|
||||
}
|
||||
RB_VM_LOCK_LEAVE();
|
||||
|
||||
if (state) {
|
||||
EC_JUMP_TAG(wfd.th->ec, state);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue