mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread_pthread (rb_timer_arm): ignore UBF_TIMER_POSIX state 2
It looks like I forgot to account for a situation involving 3 threads. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3dd6288d73
commit
8da12db13d
1 changed files with 7 additions and 1 deletions
|
@ -1386,7 +1386,13 @@ rb_timer_arm(rb_pid_t current) /* async signal safe */
|
|||
|
||||
case 1: return; /* success */
|
||||
case 2:
|
||||
rb_async_bug_errno("UBF_TIMER_POSIX state 2 unexpected", EINVAL);
|
||||
/*
|
||||
* it is possible to have another thread disarm, and
|
||||
* a third thread arm finish re-arming before we get
|
||||
* here, so we wasted a syscall with timer_settime but
|
||||
* probably unavoidable in a signal handler.
|
||||
*/
|
||||
return;
|
||||
default:
|
||||
rb_async_bug_errno("UBF_TIMER_POSIX unknown state", ERANGE);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue