Description
The specific issue motivating this is that I'm thinking of spawning a process using either asyncio
, subprocess
or multiprocessing
in the standard library.
- All those modules provides ways of waiting until the spawned process is complete. Will those work at all in
charm4py
? If they are in a method marked@coro
, will they yield control, or just block until completion? https://charm4py.readthedocs.io/en/latest/rules.html says
Note that coroutines are non-preemtive [typo] and only yield when they are waiting for something (typically occurs when they are blocked on a future or channel). When a method stops executing, control returns to the scheduler which will start or resume other methods on that process.
The methods are waiting for something, but it is not any kind of a charm
thing.
-
asyncio
has an event loop. Is that compatible withcharm
? -
multiprocessing
warns againstfork
from a process with operating system threads. Doescharm
use such threads?
More generally, will the package interoperate properly with other things in base Python
:
- Does basic file I/O qualify for the "waiting for something" condition of the documentation?
- What if you try to use threads?
- The newish native coroutine facility in
Python
along withawait
and related keywords?