[Stackless] Figuring out stackless for use in Twisted

Christopher Armstrong radix at twistedmatrix.com
Mon Jul 28 09:55:10 CEST 2003


So, I'm trying to write a Stackless Reactor for Twisted.

I'm pretty clueless about Stackless, now, though. Is there any
relevant documentation other than what's in the docstrings of the
stackless module and the classes it contains?

Right now I'm trying to figure out what exactly `become' does. The
docs say that it captures the current frame in the tasklet. I can
somewhat understand this, but I'm not sure what happens to the code
calling the function (named, say, FOO) that calls t.become(). Does it
just block until `t' switches context back? And: Does blocking on a
channel.receive automatically switch back to the main tasklet? I
assume that just means that the call to FOO will return?

I apologise if this is answered somewhere, but I can't find the place.
:-)


Oh, and before I forget: I just built stackless from CVS today, and
when I try to help(stackless) with my brand new build this is what I
get::

>>> help(stackless)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/chris/lib/python2.2/site.py", line 280, in __call__
    return pydoc.help(*args, **kwds)
  File "/home/chris/lib/python2.2/pydoc.py", line 1512, in __call__
    self.help(request)
  File "/home/chris/lib/python2.2/pydoc.py", line 1548, in help
    else: doc(request, 'Help on %s:')
  File "/home/chris/lib/python2.2/pydoc.py", line 1346, in doc
    pager(title % desc + '\n\n' + text.document(object, name))
  File "/home/chris/lib/python2.2/pydoc.py", line 267, in document
    if inspect.ismodule(object): return apply(self.docmodule, args)
  File "/home/chris/lib/python2.2/pydoc.py", line 964, in docmodule
    contents.append(self.document(value, key, name))
  File "/home/chris/lib/python2.2/pydoc.py", line 268, in document
    if inspect.isclass(object): return apply(self.docclass, args)
  File "/home/chris/lib/python2.2/pydoc.py", line 1080, in docclass
    attrs = inspect.classify_class_attrs(object)
  File "/home/chris/lib/python2.2/inspect.py", line 217, in classify_class_attrs
    obj_via_getattr = getattr(cls, name)
TypeError: attribute name must be string



Just an annoying little thing. I've just been reading the docstrings
by browsing the source (and help(stackless.tasklet) still works). :-)

-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/
_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless




More information about the Stackless mailing list