Hi Richard,<div><br></div><div>I have done some testing and running the following code in WingIDE results in a different output from running it in Eclipse:</div><div><br></div><div>----------------------------------------------------------------------------------------------------------------</div>
<div>import stackless</div><div><br></div><div>class BombPasser(object):</div><div>    def __init__(self, name, other = None):</div><div>        <a href="http://self.name">self.name</a> = name</div><div>        self.other = other </div>
<div>        if other:</div><div>            other.other = self</div><div>        self.channel = stackless.channel()</div><div>        self.tasklet = stackless.tasklet(self.run)()</div><div>        </div><div>    def run(self):</div>
<div>        print <a href="http://self.name">self.name</a>, 'started'</div><div>        while True:</div><div>            counter = self.channel.receive() - 1</div><div>            print 'in %s: counter = %s' % (<a href="http://self.name">self.name</a>, counter)</div>
<div>            if counter == 0:</div><div>                raise Exception(<a href="http://self.name">self.name</a> + " did BOOM")</div><div>            self.other.channel.send(counter)</div><div>            stackless.schedule() </div>
<div><br></div><div>if __name__ == "__main__":</div><div>    </div><div>    a1 = BombPasser('bob')</div><div>    a2 = BombPasser('tim', other = a1)</div><div>    a1.channel.send(5)</div><div>    try:        </div>
<div>        stackless.run()</div><div>    except Exception as e:</div><div>        print e.message</div><div>    print '=============== DONE ================='</div><div>    </div><div>------------------------------------------------------------------------------------------</div>
<div>Wing:</div><div><br></div><div><div>bob started</div><div>in bob: counter = 4</div><div>tim started</div><div>in tim: counter = 3</div><div>in bob: counter = 2</div><div>in tim: counter = 1</div><div>in bob: counter = 0</div>
<div>Unhandled exception in thread started by <bound method BombPasser.run of <__main__.BombPasser object at 0x02583810>></div><div><br></div><div>although the 'BOOM' exception does show up in the exception tool.</div>
<div><br></div><div>PyDev:</div><div><br></div><div>bob started</div><div>in bob: counter = 4</div><div>tim started</div><div>in tim: counter = 3</div><div>in bob: counter = 2</div><div>in tim: counter = 1</div><div>in bob: counter = 0</div>
<div>bob did BOOM</div><div>=============== DONE =================</div><div><br></div><div>What i thought would happen. </div><div><br></div><div>I have sent this as a bug report to WIngWare.</div><div><br></div><div>Cheers, Lars</div>
<br><div class="gmail_quote">On Sat, Jun 23, 2012 at 11:20 PM, Richard Tew <span dir="ltr"><<a href="mailto:richard.m.tew@gmail.com" target="_blank">richard.m.tew@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Jun 24, 2012 at 8:23 AM, lars van Gemerden <<a href="mailto:lars@rational-it.com">lars@rational-it.com</a>> wrote:<br>
> It was my inexeprience with WingIDE that did it. In the debug window it says<br>
> unhandled exception, but in the exception tool it shows that the exception<br>
> is caught normally.<br>
><br>
> Am I correct in concluding that the stackless scheduler is not emptied upon<br>
> such an exception?<br>
<br>
</div>Write some code to test this conclusion ;-)  It should only take you 30 seconds.<br>
<div class="im"><br>
> PS: I will try the code you suggested for emptying the scheduler. I you<br>
> like, i'll let you know the result.<br>
<br>
</div>No need :-)<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Richard.<br>
<br>
_______________________________________________<br>
Stackless mailing list<br>
<a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
<a href="http://www.stackless.com/mailman/listinfo/stackless" target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>====================================<br>Lars van Gemerden<br><a href="mailto:lars@rational-it.com">lars@rational-it.com</a><br>+31 6 26 88 55 39<br>
====================================<br>
</div>