[Python-ideas] Async API: some code to review
Rene Nejsum
rene at stranden.com
Wed Oct 31 07:16:47 CET 2012
>
> There is another approach to handle this. You create a dedicated
> coroutine which does writing (or reading). And if other coroutine
> needs to write, it puts data into a queue (or channel), and wait until
> writer coroutine picks it up. This way you don't care about atomicity
> of writes, and a lot of other things.
I support this idea, IMHO it's by far the easiest (or least problematic)
way to handle the complexity of concurrency.
What's the general position on monkey patching existing libs ? This
might not be possible with the above ?
/rene
>
> This approach is similar to what Greg Ewing proposed for handling
> accept() recently.
>
> --
> Paul
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
More information about the Python-ideas
mailing list