Andrew / Christian, Yes, stackless.run had been called, just not included in the email. "self" is just the current class instance, really does not matter. It appears that the important point is the definition of what can constitute a "callable". (i.e. function, class instance...?).
Thanks, Andy -----Original Message----- From: Christian Tismer [mailto:[email protected]] Sent: Saturday, March 13, 2010 6:07 AM To: The Stackless Python Mailing List Cc: Andrew Francis; Carl, Andrew F (AS) Subject: Re: [Stackless] 1. Stackless Error (Carl, Andrew F (AS)) On 3/13/10 2:34 PM, Andrew Francis wrote: > Hi Andy: > > --- On Sat, 3/13/10, [email protected]<[email protected]> wrote: > > >> Message: 1 >> Date: Fri, 12 Mar 2010 11:50:52 -0600 >> From: "Carl, Andrew F (AS)"<[email protected]> >> To:<[email protected]> >> Cc: "Carl, Andrew F \(AS\)"<[email protected]> >> Subject: [Stackless] Stackless Error >> Message-ID: >> <[email protected]> >> 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. > > example > > def printIt(message): > print message > > stackless.tasklet(printIt)(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:[email protected]> 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/ _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
