A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-January/115691.html below:

[Python-Dev] Coroutines and PEP 380

[Python-Dev] Coroutines and PEP 380 [Python-Dev] Coroutines and PEP 380Greg greg.ewing at canterbury.ac.nz
Thu Jan 19 22:41:17 CET 2012
Glyph wrote:
> [Guido] mentions the point that coroutines that can implicitly switch out from 
> under you have the same non-deterministic property as threads: you don't 
> know where you're going to need a lock or lock-like construct to update 
> any variables, so you need to think about concurrency more deeply than 
> if you could explicitly always see a 'yield'.

I'm not convinced that being able to see 'yield's will help
all that much. In any system that makes substantial use of
generator-based coroutines, you're going to see 'yield from's
all over the place, from the lowest to the highest levels.
But that doesn't mean you need a correspondingly large
number of locks. You can't look at a 'yield' and conclude
that you need a lock there or tell what needs to be locked.

There's no substitute for deep thought where any kind of
theading is involved, IMO.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4