Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r76549:e466895ddd4c
Date: 2015-03-24 18:49 +0100
http://bitbucket.org/pypy/pypy/changeset/e466895ddd4c/
Log: Turn inevitable when changing a thread-local value. This is needed
because otherwise, the thread shutdown logic write NULL as the
current ExecutionContext, but then if the transaction aborts, we're
back in time with still NULL...
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -332,6 +332,8 @@
_threadlocalref_seeme(self)
addr = llop.threadlocalref_addr(llmemory.Address)
if rgc.stm_is_enabled():
+ from rpython.rlib import rstm
+ rstm.become_inevitable()
p = llmemory.cast_adr_to_ptr(addr + offset, PSTRUCTTYPE)
p.c_value = value
else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit