Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Multiprocessing is fine, but the cost of starting another interpreter is pretty visible, so you need to create a pool, and it may not be an overall speedup if the run time is short.

It takes more careful planning than async in JS?, say, or goroutines.



Yeah but for JS style async you'd use probably use an event loop in Python, not multi processing.


Yes. But, frankly, async is also simpler in JS than in Python: e.g. no need to start a reactor loop.


Starting the event loop is no worse than any setup of a main function, it’s a oneliner: asyncio.get_event_loop().run_until_completion(my_async_main)


Errr no, that has been replaced with asyncio.run quite some time ago.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: