[ruby-cvs:72595] normal:r65495 (trunk): thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf

normal at ruby-lang.org normal at ruby-lang.org
Thu Nov 1 23:10:47 JST 2018

normal	2018-11-01 23:10:47 +0900 (Thu, 01 Nov 2018)

  New Revision: 65495


    thread_pthread.c (native_ppoll_sleep): new eventfd (or pipe) for ubf
    Relying on ubf_select + ubf_list for main thread is not
    guaranteed to wake a process up as it does not acquire
    sigwait_fd and all other threads may be sleeping.
    native_cond_sleep and the sigwait_fd path are immune to TOCTOU
    issues, but native_ppoll_sleep may have its wakeup stolen
    by sigwait_fd sleeper and the RUBY_VM_INTERRUPTED check is
    Note: for pthreads platforms without POSIX timers, this becomes
    more expensive than Ruby 2.5, as six pipe FDs come into use.
    Linux is best off with only two descriptors for eventfd.
    cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1437559

  Modified files:

More information about the ruby-cvs mailing list