[Stackless] comments on PEP 219

Jeremy Hylton jeremy at alum.mit.edu
Tue Mar 13 19:30:37 CET 2001


>>>>> "BR" == Bernd Rinn <Bernd.Rinn at epost.de> writes:

  BR> On Tue, Mar 13, 2001 at 12:17:39PM -0500, Gordon McMillan wrote:
  >> The one instance I can find on the Stackless list (of attempting
  >> to use a continuation across interpreter invocations) was a call
  >> the uthread.wait() in __init__. Arguably a (minor) nuisance,
  >> arguably bad coding practice (even if it worked).

[explanation of code practice that lead to error omitted]

  BR> So I suspect that you might end up with a rule of thumb:

  BR> """ Don't use classes and libraries that use classes when doing
  BR> IO in microthreaded programs!  """

  BR> which might indeed be a problem. Am I overlooking something
  BR> fundamental here?

Thanks for asking this question in a clear and direct way.

A few other variations on the question come to mind:

    If a programmer uses a library implement via coroutines, can she
    call library methods from an __xxx__ method?

    Can coroutines or microthreads co-exist with callbacks invoked by
    C extensions? 

    Can a program do any microthread IO in an __call__ method?

If any of these are the sort "in theory" problems that the PEP alludes
to, then we need a full spec for what is and is not allowed.  It
doesn't make sense to tell programmers to follow unspecified
"reasonable" programming practices.

Jeremy
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless



More information about the Stackless mailing list