Lisp mentality vs. Python mentality
Paul Rubin
http
Sun Apr 26 18:03:48 EDT 2009
Carl Banks <pavlovevidence at gmail.com> writes:
> Which is "communicating with the rest of the program periodically".
>
> Presumably you have to protect objects to share them? There you go:
> anytime you try to acquire a lock have the thread check to see whether
> to abort.
Normally, acquiring a lock doesn't require running code in other
threads, at least in the uncontended case. If you have to switch
threads twice in order to acquire a lock, your implementation could
use some improvement.
More information about the Python-list
mailing list