[Stackless] 1. Stackless Error (Carl, Andrew F (AS))
tismer at stackless.com
Sat Mar 13 15:07:01 CET 2010
On 3/13/10 2:34 PM, Andrew Francis wrote:
> Hi Andy:
> --- On Sat, 3/13/10, stackless-request at stackless.com<stackless-request at stackless.com> wrote:
>> Message: 1
>> Date: Fri, 12 Mar 2010 11:50:52 -0600
>> From: "Carl, Andrew F (AS)"<a.carl at ngc.com>
>> To:<stackless at stackless.com>
>> Cc: "Carl, Andrew F \(AS\)"<a.carl at ngc.com>
>> Subject: [Stackless] Stackless Error
>> <CE1C9C26CC18FD4E804F232CEC1F845103B10BBF at XMBTX132.northgrum.com>
>> Content-Type: text/plain; charset="us-ascii"
>> Attempting to use the following:
>> Stackless.tasklet( self.r_run(args) )
>> I get the following post run error:
>> "TypeError: tasklet function must be a callable"
> I don't know what self is. However tasklet() expects a callable (
> hence the error). A while you can create a tasklet is by passing
> function (a callable) to the tasklet function. The arguments are passed separately.
> def printIt(message):
> print message
The confusing part of this is that Andy did not call stackless.run,
so his test appears to do nothing, because the tasklet does not run at
all in the first place and gets killed when python ends.
The other approach
Stackless.tasklet( self.r_run(args) )
breaks for the reason you pointed out.
cheers - chris
Christian Tismer :^)<mailto:tismer at stackless.com>
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Stackless