[Stackless] Proposal: new tasklet method set_args(*args, **kw) that combines setup() and remove()

Christian Tismer tismer at stackless.com
Mon Nov 18 13:27:56 CET 2013

On 18.11.13 11:39, Anselm Kruis wrote:
> Hi,
> I propose to add a new method set_args(*args, **kw) to class tasklet, 
> that combines
>     stackless.setup(*args, **kw)
>     stackless.remove()
> Rationale: it is currently not possible to create an alive tasklet 
> without scheduling it (except via unpickling or direct __setstate__).
> With the new bind_thread() method, one can think of use cases where 
> one thread creates tasklets and another thread executes them. No need 
> to insert these tasklets into the current run queue. It could even 
> cause races.
> With set_args() in place, setup() would become a simple shortcut for 
> set_args() followed by insert().
> Does this proposal make sense?

Yes, sounds good!

Btw., stackless 2.8.0b1 is almost ready, just need to write up the policy.

cheers - chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
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 mailing list