Commit Graph

3 Commits

Author SHA1 Message Date
Fantix King 200e140436 Fix tests for Python 3.9 2020-12-06 19:43:25 -08:00
Yury Selivanov 0814a4f6a8
Stop passing the `loop` arg around in in test_spawning_external_process 2019-10-24 22:30:43 -04:00
Adam Bella fde5d14f7d fix - uvloop freeze when something other than uvloop invoke process fork and execute non-python process
Problem:
Uvloop for each loop register `atFork` handler that is called after fork is executed by forked child.
This handler works fine when fork was invoked by uvloop. In case fork is invoked by something else (such as external library)
uvloop freeze in this handler because:
- GIL is acquired inside `atFork` handler -> in case forked child does not contain python runtime `atFork` handler freeze at obtaining GIL
- when compiled in debug mode (`make debug`) cython trace calls are inserted inside compiled `atFork` handler -> in case forked child does not contain python runtime `atFork` handler freeze at providing trace call

Solution:
This fix solve described problems by implementing `atFork` handler as C function so that forked child can call it safely whether or not contains python runtime.
2019-10-24 22:24:16 -04:00