[ENH] shiffmanTimeout-brp( was: timing out a method call
[su][cd][sm])
pinkney_b at aircom.co.za
pinkney_b at aircom.co.za
Thu Oct 21 16:25:04 UTC 2004
Ok,
Here is my port of the Shiffman timeout to Squeak 3.7/3.8.
The Squeak (ANSI?) exception library is a bit different and Squeak has the
Chronology library to specify durations.
I took the liberty of renaming the method to read nicely.
Three SUnit tests included.
Load and try:
[ 3 + 4 ] duration: 1 minute timeoutDo: [ 6 ]. "Answers 6"
[ 50000 factorial ] duration: 1 minute timeoutDo: [ 9 ]. "Answers 9"
Cheers
Brent
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shiffmanTimeout-brp.1.cs.gz
Type: application/x-gzip
Size: 1964 bytes
Desc: shiffmanTimeout-brp.1.cs.gz
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041021/afdc4cf6/shiffmanTimeout-brp.1.cs.bin
More information about the Squeak-dev
mailing list
|