[pypy-dev] [translation:ERROR] Exception: 'no_release_gil' function can release the GIL

Armin Rigo armin.rigo at gmail.com
Fri Dec 23 05:12:41 EST 2016


Hi,

On 22 December 2016 at 23:58, Shubha Ramani via pypy-dev
<pypy-dev at python.org> wrote:
> [translation:ERROR] Exception: 'no_release_gil' function can release the
> GIL: <function assemble_loop at 0x0000000070d4d2e0>

assemble_loop() is marked as no_release_gil because things can get
subtly wrong if it releases the GIL in the middle of making machine
code and another thread reaches assemble_loop() too.

For debugging output, use debug_print().

If you really want to write a custom file, then you need to define and
use the C functions open(), write() and close() in a way that calling
them won't release the GIL.  Alternatively, you can remove
@rgc.no_release_gil on assemble_loop() and hope that the crashes you
get are very rare.

Or, stick everything on the AsmInfo() instance returned by
assemble_loop(), and dump that info later.


A bientôt,

Armin.


More information about the pypy-dev mailing list