On 08Nov2019 00:52, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
Cameron Simpson wrote:
Spencer's modules run unconditional stuff in addition to defining classes. That may cause trouble.

It will -- because of the import lock, they won't run simultaneously
in the same process.

I was unsure as to how serialised this was: just the import data structures or the whole source-of-the-module. But I guess serialising the latter is essential anyway, now I think about it.

Hence my separate post suggesting the OP move the "main task" into a function, runs the imports serailly (very cheap) and then kick off threads if that's what he wants.

Thanks for the clarification.

Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to