-
-
Notifications
You must be signed in to change notification settings - Fork 3
To GIL or not to GIL #10
Comments
A minimal example to reproduce would be from palace import *
use_fileio(lambda name: open(name, 'rb'))
with Device() as dev, Context(dev) as ctx, decode('audio file').play(12345, 6) as src:
while src.playing: ctx.update() |
I'd be grateful if you two @Huy-Ngo and @9a24f0 can do a little bit of research on this and try to solve it. If none of us figure out a fix by the end of avril, we can declare this as a technical debt and precede to release v0.2 anyway. Edit: it's the end of the month, this is dropped from the list of 0.2-blocking issues. |
Since 1.0 is supposed to be the stable version, this should be fixed then. |
I'm a bit confused here. Which routines are marked with |
There are C++ functions defined in |
Migrated to SourceHut TODO ~cnx/palace#1. |
As described in Cython's documentation, the Python GIL may need some special care. Currently
all C++ classes are declared withC++ routines are randomly marked withnogil
nogil
andwith gil
, and I amunsurewhetherit is not a good practice.Edit: the acquire and release of GIL are definitely problematic, and so far all discovered deadlocks are with resource loading:
cache
d, either viaBuffer
orfree
(Deadlock if Buffer called on the resource being cached async #73).BaseDecoder
). Note that if it's loaded into aBuffer
, the caching process is done on the main thread and thus no deadlock occurs.FileIO
, either as a stream (decode
) or as a buffer. This can either be a deadlock or a segfault.The text was updated successfully, but these errors were encountered: