From: rogeeff (rogeeff_at_[hidden])
Date: 2001-12-19 04:05:09
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.
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.
What do you think?
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk