Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63408 > unrolled thread
| Started by | Skip Montanaro <skip@pobox.com> |
|---|---|
| First post | 2014-01-06 21:15 -0600 |
| Last post | 2014-01-06 21:15 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Trying to wrap my head around futures and coroutines Skip Montanaro <skip@pobox.com> - 2014-01-06 21:15 -0600
| From | Skip Montanaro <skip@pobox.com> |
|---|---|
| Date | 2014-01-06 21:15 -0600 |
| Subject | Re: Trying to wrap my head around futures and coroutines |
| Message-ID | <mailman.5117.1389064565.18130.python-list@python.org> |
>From the couple responses I've seen, I must have not made myself clear. Let's skip specific hypothetical tasks. Using coroutines, futures, or other programming paradigms that have been introduced in recent versions of Python 3.x, can traditionally event-driven code be written in a more linear manner so that the overall algorithms implemented in the code are easier to follow? My code is not multi-threaded, so using threads and locking is not really part of the picture. In fact, I'm thinking about this now precisely because the first sentence of the asyncio documentation mentions single-threaded concurrent code: "This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives." I'm trying to understand if it's possible to use coroutines or objects like asyncio.Future to write more readable code, that today would be implemented using callbacks, GTK signals, etc. S
Back to top | Article view | comp.lang.python
csiph-web