[前][次][番号順一覧][スレッド一覧]

ruby-changes:51102

From: normal <ko1@a...>
Date: Tue, 1 May 2018 08:47:26 +0900 (JST)
Subject: [ruby-changes:51102] normal:r63309 (trunk): thread_sync.c (condvar_ptr): reset fork_gen after forking

normal	2018-05-01 08:47:21 +0900 (Tue, 01 May 2018)

  New Revision: 63309

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

  Log:
    thread_sync.c (condvar_ptr): reset fork_gen after forking
    
    Otherwise the condition variable waiter list will always
    be empty, which is wrong :x
    
    [Bug #14725] [Bug #14634]

  Modified files:
    trunk/thread_sync.c
Index: thread_sync.c
===================================================================
--- thread_sync.c	(revision 63308)
+++ thread_sync.c	(revision 63309)
@@ -1308,6 +1308,7 @@ condvar_ptr(VALUE self) https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L1308
 
     /* forked children can't reach into parent thread stacks */
     if (cv->fork_gen != fork_gen) {
+        cv->fork_gen = fork_gen;
         list_head_init(&cv->waitq);
     }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]