3 ms·
> Subinterpreters are only relevant if you're writing C-code that embeds the python interpreter. [...] A python developer never uses these directly. The linked
by pansa2 6y ago
> Subinterpreters are only relevant if you're writing C-code that embeds the python interpreter. [...] A python developer never uses these directly.
The linked article is about making subinterpreters available to pure Python code.
> Pretty soon just use async-await always.
I can see async/await supplanting threading for I/O-bound concurrency, but it doesn't provide parallelism. For that, maybe subinterpreters will eventually supplant multiprocessing?
- BiteCode_dev 6y agoasync / await is just a protocol to delegate async behavior outside of your control flow. You can provide the async behavior using any solution you want: threads, io event loop, subinterpretters, subprocess... It can all be called from async / await. In fact, if you use asyncio, the lib, it provides mechanisme to await from threads, subprocess.Popen, and multiprocessing pools.