Author: Remi Meier <[email protected]>
Branch: stmgc-c7
Changeset: r72306:f1bc1a8a5ae1
Date: 2014-07-01 16:14 +0200
http://bitbucket.org/pypy/pypy/changeset/f1bc1a8a5ae1/
Log: be sure to initialize the transaction_length when starting a thread
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -62,7 +62,7 @@
c_thread_acquirelock = llexternal('RPyThreadAcquireLock', [TLOCKP, rffi.INT],
rffi.INT,
releasegil=True) # release the GIL
-c_thread_acquirelock_timed = llexternal('RPyThreadAcquireLockTimed',
+c_thread_acquirelock_timed = llexternal('RPyThreadAcquireLockTimed',
[TLOCKP, rffi.LONGLONG, rffi.INT],
rffi.INT,
releasegil=True) # release the GIL
@@ -97,9 +97,11 @@
@specialize.arg(0)
def ll_start_new_thread(func):
- if rgc.stm_is_enabled:
- from rpython.rlib.rstm import register_invoke_around_extcall
+ if rgc.stm_is_enabled():
+ from rpython.rlib.rstm import (register_invoke_around_extcall,
+ set_transaction_length)
register_invoke_around_extcall()
+ set_transaction_length(1.0)
ident = c_thread_start(func)
if ident == -1:
raise error("can't start new thread")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit