[Vm-dev] [VM-dev] Problem when waiting on delay during ensure block
dionisiydk at gmail.com
Wed Jul 26 09:15:16 UTC 2017
I found interesting problem. Following script will never return:
s := Semaphore new.
p1 := [
[ 100 seconds asDelay wait ] ensure: [ s waitTimeoutMSecs: 50 ]
100 milliSeconds asDelay wait.
If you will interrupt it by cmd+. It will show debugger. If you will close
it new debugger will be opened on Unwind error. And in Squeak any attempt
to close it will open same debugger again and again.
I thing it is important bug. It shows that we are able to write quite
simple code which will be impossible to terminate. For example #ensure:
part could include business logic to send some remote notifications which
will use delays. And during debug it will be easy to get this scenario.
In Pharo it is more worth because unwind error leads to infinite recursion
for opening debuggers and image crash after minutes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev