Re:Uvloop – Ultra fast implementation of asyncio event loop ...
by aikah on Sunday September 25, 2016 @07:29PM
(#12578035)
> This has been a nightmare in C# which pioneered async/await - a lot of developers are struggling with footguns from mixing sync and async code.
The big difference is that C# supports both multithreading and parallelism out of the box. Python has multithreading but with a GIL, nodejs has none of the 2.
This has been a nightmare in C# which pioneered async/await - a lot of developers are struggling with footguns from mixing sync and async code.
Ryan Dhal said that he picked JavaScript for Node because he was afraid of this and wanted a language without synchronous APIs already built in.
I think Python 3.5+ async/await is fantastic don't get me wrong - but if you want to mix and match I'd recommend getting a second server that runs the synchronous framework and then communicating over network (REST HTTP for example) between the completely asynchronous server and the one running the thread pool.