Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r73281:b7ef31a82744
Date: 2014-09-02 15:41 +0200
http://bitbucket.org/pypy/pypy/changeset/b7ef31a82744/

Log:    backout 62f4648aed86

        add an explanation and a link to the full commit for why

diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -60,8 +60,11 @@
 c_setvbuf = llexternal('setvbuf', [FILEP, rffi.CCHARP, rffi.INT, rffi.SIZE_T],
                        rffi.INT)
 
-c_fclose = llexternal('fclose', [FILEP], rffi.INT)
-c_pclose = llexternal('pclose', [FILEP], rffi.INT)
+# Note: the following two functions are called from __del__ methods,
+# so must be 'releasegil=False'.  Otherwise, a program using both
+# threads and the RFile class cannot translate.  See c684bf704d1f
+c_fclose = llexternal('fclose', [FILEP], rffi.INT, releasegil=False)
+c_pclose = llexternal('pclose', [FILEP], rffi.INT, releasegil=False)
 
 c_getc = llexternal('getc', [FILEP], rffi.INT, macro=True)
 c_fgets = llexternal('fgets', [rffi.CCHARP, rffi.INT, FILEP], rffi.CCHARP)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to