Python 2.0 and Stackless

David Bolen db3l at fitlinxx.com
Mon Aug 7 15:47:51 EDT 2000


Toby Dickenson <mbel44 at dial.pipex.net> writes:

> Consider this "naive" function
> 
> def m(y):
>    x()
>    try:
>       y()
>    finally:
>       z()
> 
> Today I can be sure that a call to z is always preceeded by a single
> call to x. Stacklessness makes that assumption false.

Um, of course unless multiple threads are involved, in which case your
naive function may be interrupted between its calls to x() and z() and
some other routine may call x() in between, right?

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list