In all cases it is useful to have some sort of "tasklet manager" that helps
keep track of tasklets.
This can be as simple as a set of weakrefs to tasklets that you create, or
something more complex, like a tasklet manager that creates tasklets for
you and assigns them to different sessions, or contexts, or whatnot.

More complex application can benefit from tasklet watchers, At CCP we would
for example be able to enumerate tasklet by some arbitrary context, and
"cancel" them.
We would have "cancel" barriers, for example, across service call layers.
This would enable us to cancel all executions that were being done on
behalf of some  session that was changing state, for example.

On 19 June 2015 at 18:29, Anselm Kruis <[email protected]> wrote:

> Hi Rob,
>
> Indeed, you don't need any C-code. Since Stackless 2.7.6r3 we have a much
> improved Python API for debugging. And the documentation contains a
> complete example.
> http://stackless.readthedocs.org/en/2.7-slp/library/stackless/debugging.html#tracing-tasklets
>
> Regards
>   Anselm
>
>
>
> Am 19.06.2015 um 19:19 schrieb Rob Galanakis:
>
>> I think if you are tracking the creation of your tasklets with some
>> wrapper, you can enumerate over them and inspect... something from them. I
>> am pretty sure we had something like this at CCP that didn't require any C
>> code, but I don't have access to the code anymore.
>>
>> On Fri, Jun 19, 2015 at 6:01 AM, Anselm Kruis <
>> [email protected]>
>> wrote:
>>
>>  Hi ravi,
>>>
>>> if you can run your program under debugger control, then I recommend
>>> Eclipse PyDev or any other debugger that's based on the pydev code.
>>>
>>> If you can't use a debugger, pyheapdump (
>>> https://pypi.python.org/pypi/pyheapdump) might be an option.
>>>
>>> Finally you can write your own debugging code.
>>>
>>> Regards
>>>    Anselm
>>>
>>>
>>> Am 18.06.2015 um 23:07 schrieb temp sha:
>>>
>>>  hi,
>>>>
>>>> I have a complex python program running 100 tasklets simultaneously. I
>>>> want to take dump of all the running tasklets including their current
>>>> status and back trace at the time of exception. Can any one let me
>>>> know how can this be done ?
>>>>
>>>> Thanks,
>>>> ravi
>>>>
>>>> _______________________________________________
>>>> Stackless mailing list
>>>> [email protected]
>>>> http://www.stackless.com/mailman/listinfo/stackless
>>>>
>>>>
>>>>  --
>>>   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, Dr. Arno Steitz
>>> 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
>>>
>>>
>>>
>>> I think if you are tracking the creation of your tasklets with some
>>> wrapper, you can enumerate over them and inspect... something from
>>> them. I am pretty sure we had something like this at CCP that didn't
>>> require any C code, but I don't have access to the code anymore.
>>>
>>> On Fri, Jun 19, 2015 at 6:01 AM, Anselm Kruis
>>> <[email protected] <mailto:[email protected]>>
>>> wrote:
>>>
>>>     Hi ravi,
>>>
>>>     if you can run your program under debugger control, then I
>>>     recommend Eclipse PyDev or any other debugger that's based on the
>>>     pydev code.
>>>
>>>     If you can't use a debugger, pyheapdump
>>>     (https://pypi.python.org/pypi/pyheapdump) might be an option.
>>>
>>>     Finally you can write your own debugging code.
>>>
>>>     Regards
>>>       Anselm
>>>
>>>
>>>     Am 18.06.2015 um 23:07 schrieb temp sha:
>>>
>>>         hi,
>>>
>>>         I have a complex python program running 100 tasklets
>>>         simultaneously. I
>>>         want to take dump of all the running tasklets including their
>>>         current
>>>         status and back trace at the time of exception. Can any one let
>>> me
>>>         know how can this be done ?
>>>
>>>         Thanks,
>>>         ravi
>>>
>>>         _______________________________________________
>>>         Stackless mailing list
>>>         [email protected] <mailto:[email protected]>
>>>         http://www.stackless.com/mailman/listinfo/stackless
>>>
>>>
>>>     --
>>>      Dipl. Phys. Anselm Kruis                       science + computing
>>> ag
>>>      Senior Solution Architect                      Ingolstädter Str. 22
>>>      email [email protected]
>>>     <mailto:[email protected]>             80807 München,
>>>     Germany
>>>      phone +49 89 356386 874 <tel:%2B49%2089%20356386%20874>  fax 737
>>>     www.science-computing.de <http://www.science-computing.de>
>>>
>>>     --
>>>     Vorstandsvorsitzender/Chairman of the board of management:
>>>     Gerd-Lothar Leonhart
>>>     Vorstand/Board of Management:
>>>     Dr. Bernd Finkbeiner, Dr. Arno Steitz
>>>     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] <mailto:[email protected]>
>>>     http://www.stackless.com/mailman/listinfo/stackless
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Stackless mailing list
>>> [email protected]
>>> http://www.stackless.com/mailman/listinfo/stackless
>>>
>>
> --
>  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, Dr. Arno Steitz
> 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
>
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to