Author: Remi Meier <remi.me...@gmail.com>
Branch: nogil-unsafe-2
Changeset: r90455:726153037b52
Date: 2017-03-02 11:04 +0100
http://bitbucket.org/pypy/pypy/changeset/726153037b52/

Log:    avoid clearing threadlocals on thread-exit

        there is a release-gil call after the call to thread_die (that
        clears the threadlocal with 0xdd). But then, synclock is 0xdddddddd.
        So we don't clear them for now.

diff --git a/rpython/translator/c/src/threadlocal.c 
b/rpython/translator/c/src/threadlocal.c
--- a/rpython/translator/c/src/threadlocal.c
+++ b/rpython/translator/c/src/threadlocal.c
@@ -136,7 +136,7 @@
     if (tls->ready == 42) {
         tls->next->prev = tls->prev;
         tls->prev->next = tls->next;
-        memset(tls, 0xDD, sizeof(struct pypy_threadlocal_s));  /* debug */
+        // XXX: called before a release_gil -> synclock set to 0xddddddd... 
memset(tls, 0xDD, sizeof(struct pypy_threadlocal_s));  /* debug */
         tls->ready = 0;
     }
     _RPython_ThreadLocals_Release();
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to