[Python-ideas] async/await in Python (C API ?)

M.-A. Lemburg mal at egenix.com
Mon Apr 20 16:55:49 CEST 2015


On 20.04.2015 15:34, Andrew Svetlov wrote:
> Marc-Andre Lemburg, do you have ideas for how C API should look like?
> Personally I have no idea for now (but I have never thought about too
> much).

See my reply to Yury. I don't have any preference for a particular
approach. As long as we can have an API that's easy to use in
80% of the use cases, I'd be happy :-) (and then hopefully cover
the remaining 20% with something more complex but still possible).

> On Mon, Apr 20, 2015 at 4:18 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>> Hi Yury,
>>
>> do you have any plans of also exposing an easy to use C API
>> for async and await ?
>>
>> I think this would be useful to e.g. implement asynchronous
>> database access. Most of those adapters are written in C and
>> need so a C API would help a lot with this.
>>
>> A problem I ran to with e.g. gevent is that it's not easy
>> to use the available async APIs from C, even less so for
>> systems like the ODBC API which require the use of polling
>> for async processing and which don't give you access to e.g.
>> tap into long running parts of the communication (sockets, etc.)
>> which gevent does at the Python level.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 20 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-ideas mailing list