[ENH] shiffmanTimeout-brp (version 2 [su][cd][sm][er])

pinkney_b at aircom.co.za pinkney_b at aircom.co.za
Fri Oct 22 11:26:17 UTC 2004


Hi,

Here is my second attempt at the Schiffman timeout. Thanks for the reviews.

On the advice of Mssrs Rollandin and Wirblat, the method has been renamed

     #valueWithin:onTimeout:

The comments annotating my previous axamples have also been corrected.

Frm the preamble...

>From Squeak3.8alpha of 8 September 2004 [latest update: #6297]'!
"Change Set:		shiffmanTimeout-brp
Date:			21 October 2004
Author:			Brent Pinkney

Implementation of #valueWithin:onTimeout:.

This changeset reimplements Allan Schiffman's timeout mechanism for Squeak
3.8.

Usage:
[ 50000 factorial ] valueWithin: 1 second onTimeout: [ 666 ].  "Answers 666"

[ 3 + 4 ] valueWithin: 1 second onTimeout: [ 666 ].  "Answers 7"

Allan's implementation has been reworked to satisfy ANSI exception handling
and the Duration class.

Included in this changest are three new SUnit tests.

	ExceptionTests >> #testNoTimeout
	ExceptionTests >> #testTimeout
	ExceptionTests >> #testTimeoutWithZeroDuration

This changest makes some minor changes to ExceptionTester to accomodate
#testTimeout.

Cheers

Brent






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shiffmanTimeout-brp.2.cs.gz
Type: application/x-gzip
Size: 1984 bytes
Desc: shiffmanTimeout-brp.2.cs.gz
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041022/28aa139d/shiffmanTimeout-brp.2.cs.bin


More information about the Squeak-dev mailing list