Steven D. Majewski sdm7g at Virginia.EDU
Sat Jun 5 00:31:28 EDT 1999

On Fri, 4 Jun 1999, Tim Peters wrote:

> the-guarantee-of-exclusion-simplifies-much-of-the-implementation-ly y'rs  -
> tim

Ahh -- getting nostalgic for old arguments again: 

 I recall this was one of the reasons I favored coroutines over threads --
the explicit yield means that you don't need locks. Sort of like the
non-preemptive multitasking on the Mac. The Mac, of course, is now 
moving towards a fully preemptive multitasking model -- which makes
better sense for a OS because you can't control all of the code in all
of the apps and ensure that they all behave like good citizens. However,
in a single app, that's not a problem, and cooperative multitasking 
with coroutines is a simpler model. 

BTW: Does anyone have anything to add about how threads and locking 
work in JPython? Is it Bug/Feature-compatible with CPython wrt threads,
or does it manage to use any of the Java thread feature to advantage here?

---|  Steven D. Majewski   (804-982-0831)  <sdm7g at Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---

 "IA-64 looks just about like what you would expect from a PA-RISC
  and IA-32 train wreck with a little VLIW thrown in for spice."
 * Thomas J. Merritt  <tjm at> in <news:comp.arch> *

More information about the Python-list mailing list