Hi Richard, It was my inexeprience with WingIDE that did it. In the debug window it says unhandled exception, but in the exception tool it shows that the exception is caught normally.
Am I correct in concluding that the stackless scheduler is not emptied upon such an exception? Cheers, Lars PS: I will try the code you suggested for emptying the scheduler. I you like, i'll let you know the result. On Sat, Jun 23, 2012 at 8:30 PM, Richard Tew <[email protected]>wrote: > On Sat, Jun 23, 2012 at 6:51 PM, Lars van Gemerden <[email protected]> > wrote: > > Running "mainloop" above (based on the pumping pattern in the > > documentation) leads to a printout of the exception stack (uncaught in > the > > code above). After that at least one tasklet keeps running. > > > > Why does this happen? > > Why you are getting an exception printed is unclear from the code you > have provided. You would need to provide a reproduction case so the > problem could be observed. Or at the least, the exception trace given > it is some Stackless caused problem and not a side-effect of your > code. > > > In a related question, i am trying to define unit tests for my code, and > > between tests would like to kill/remove/empty the stackless scheduler, > e.g. > > in tearDown. What is the easiest way to do this (the exception above > seems > > not the way to go ;-) ? > > You can empty the scheduler by enumerating the tasklets in the > scheduler. This can be done by getting the current tasklet (t = > stackless.current) and stepping through the chain of scheduled > tasklets (t.next, t.next.next, t.next.next.next...). > > The following code is untested and may not work: > > ct = stackless.current > while ct.next is not ct: > ct.next.kill() > > > I am working (since today) with Wingware as IDE (the only IDE with > stackless > > debug support?) > > Yes. > > Cheers, > Richard. > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless > -- ==================================== Lars van Gemerden [email protected] +31 6 26 88 55 39 ====================================
_______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
