[ruby-cvs:71667] normal:r64575 (trunk): thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_select

normal at ruby-lang.org normal at ruby-lang.org
Tue Aug 28 02:17:08 JST 2018


normal	2018-08-28 02:17:08 +0900 (Tue, 28 Aug 2018)

  New Revision: 64575

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64575

  Log:
    thread_pthread.c: avoid lock ping-pong in do_gvl_timer & ubf_select
    
    This simplifies the locking logic somewhat.
    
    While we're at it, designate_timer_thread is worthless in
    ubf_select because gvl_acquire_common already guarantees there
    is a gvl.timer if gvl->waitq is populated.
    
    In the future (for auto-fiber), this will allow using
    th->unblock.func for rb_waitpid callers (via rb_sigchld_handler).

  Modified files:
    trunk/thread_pthread.c


More information about the ruby-cvs mailing list