minify
minify copied to clipboard
Python binding hangs in forked process
When using the Python bindings with multiprocessing (forking the process via a Pool, to parallelize the minify work), minify appears to hang.
In particular, this seems to happen when minify is imported via the main process, prior to forking the new processes.
A workaround is to ensure that the library doesn't get imported prior to forking (i.e., have the new forked processes perform the import).
I'm not sure if there's any easy library change to fix this, but I at least wanted to let others know of the workaround.
--
I'm using Python3.10.4; the installed go version is go1.17.1; Ubuntu 22.04.1.