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?

regards
  Anselm

--
 Dipl. Phys. Anselm Kruis                       science + computing ag
 Senior Solution Architect                      Ingolstädter Str. 22
 email [email protected]             80807 München, Germany
 phone +49 89 356386 874  fax 737               www.science-computing.de
--
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Michael Heinrichs, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to