Hi Andrew, On Sun, Jan 8, 2012 at 21:24, Andrew Francis <[email protected]> wrote: > A silly question? What is the paper you are discussing?
The Problem with Threads, Edward A. Lee, EECS 2006. > Perhaps this is off-topic, in non-trivial stackless programme using > cooperative scheduling, unless you explicitly impose a logical ordering, it > is difficult to predict > when a particular tasklet will run. The round-robin doesn't mean much. Ok, so basically no real Stackless program relies on a particular order anyway. This is in line with what I expected. > If I understand what you are proposing, the problem I see with yielding in > the coarse-grained tasklet-as-transaction, is that you probably need more > machinery to ensure ACID properties, since you are now getting thread > interweaving and potential race conditions. Yes, and this machinery is exactly what STM libraries offer. Given that you have multiple transactions that can *mostly* occur in parallel, STM ensures that in *all* cases, it will look like the transactions have been run serially, while actually performing them in parallel under the hood. A bientôt, Armin. _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
