Message191093
>> We have to be careful with the GIL: PyMem_*() functions can only be
>> called when holding the GIL.
> (...)
> I think there's a potential problem here :)
I didn't understand the motivation to require the GIL held for PyMem_Malloc(). I searched in the source code history and on the Internet (archives of python-dev). In my opinion, the restiction is motivated by a bug: PyMem_Malloc() calls (indirectly) PyObject_Malloc() in debug mode, and PyObject_Malloc() is not thread-safe.
I opened a thread on python-dev to discuss this point. |
|
Date |
User |
Action |
Args |
2013-06-13 22:07:03 | vstinner | set | recipients:
+ vstinner, georg.brandl, amaury.forgeotdarc, ncoghlan, kristjan.jonsson, christian.heimes, serhiy.storchaka |
2013-06-13 22:07:03 | vstinner | set | messageid: <1371161223.07.0.0226419694161.issue18203@psf.upfronthosting.co.za> |
2013-06-13 22:07:03 | vstinner | link | issue18203 messages |
2013-06-13 22:07:02 | vstinner | create | |
|