Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-12-20 11:21:02


At 04:05 AM 12/19/2001, rogeeff wrote:

>Hi,
>
>After considering several possible solutions for implementing
>function timeout in WIN32 platform. it seems that there is no
>reliable solution based on async. canselation. Here what I propose:
>
>1. As usual we need Timer thread. It could be new thread started
>every time we need to run test case with timeout. It could be current
>thread while test case run in new one. It could be permanent thread
>responsible for timeouts.
>2. Implementation will assume *synchronous* cancelation. This mean
>that when timeout occured Timer thread will set some 'timeout flag'
>which will be checked with every access to the framework. Now the
>user responcibility is to make sure that test case accessing
>framework frequently enough.

A typical reason for a timeout is that a test case is looping. Given that
Boost (and others) often are dealing with testing libraries, the loop is
often deep inside some library component. How can we "make sure that test
case [is] accessing [the] framework frequently enough"?

Or am I misunderstanding something?

>3. Timer thread will set internal timeout in, let say, 1 second while
>it will wait for current test case to complete. If timeout will
>occured. we consider this as a fatal error and abort testing.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk