Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r97455:a9d36d6af872
Date: 2019-09-12 10:54 +0200
http://bitbucket.org/pypy/pypy/changeset/a9d36d6af872/

Log:    #3072

        Destroy the condition variable before the mutex

diff --git a/rpython/translator/c/src/thread_pthread.c 
b/rpython/translator/c/src/thread_pthread.c
--- a/rpython/translator/c/src/thread_pthread.c
+++ b/rpython/translator/c/src/thread_pthread.c
@@ -369,12 +369,12 @@
                if (lock->next)
                        lock->next->prev = lock->prev;
 
+               status = pthread_cond_destroy(&lock->lock_released);
+               CHECK_STATUS("pthread_cond_destroy");
+
                status = pthread_mutex_destroy(&lock->mut);
                CHECK_STATUS("pthread_mutex_destroy");
 
-               status = pthread_cond_destroy(&lock->lock_released);
-               CHECK_STATUS("pthread_cond_destroy");
-
                /* 'error' is ignored;
                   CHECK_STATUS already printed an error message */
        }
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to