[Python-ideas] Async API
Kristján Valur Jónsson
kristjan at ccpgames.com
Sat Oct 27 12:27:40 CEST 2012
Yes, stacklesslib provides this functionality with the call_on_thread() api, which turns a blocking operation into a non-blocking one. This is also useful for cpu bound operations, btw. For example, in EVE, when we need to do file operations and zipping of local files, we do it using this api.
K
-----Original Message-----
From: Python-ideas [mailto:python-ideas-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Yury Selivanov
Sent: 27. október 2012 05:07
To: Nick Coghlan
Cc: Python-ideas at python.org
Subject: Re: [Python-ideas] Async API
It would be great if we can address those problems with the new async API. I.e. we can use threadpools where necessary, but make the public API look fancy and yield-from-able. Same approach that Joyent uses in their libuv. And when OSes gain more advanced and wide non-blocking support we can decrease use of threads.
More information about the Python-ideas
mailing list