Comment #14 on issue 871 by [email protected]: Timeout speed
optimization
http://code.google.com/p/robotframework/issues/detail?id=871
The current windows solution has similar problems (IMHO worse) than the one
that I am suggesting.
Basically thread is not stopped if in c-code (unless we are ending the
execution as the thread is a daemon). This can currently influence the
tests that will be run after the timeouted thread.
Short demonstration (run in windows):
<foo.py>
from time import sleep, time
import sys
def foo():
try:
sys.__stdout__.write('sleeping soon %d..\n' % time())
sleep(5)
sys.__stdout__.write('moi\n')
print 'hello'
finally:
sys.__stdout__.write('\nfinal words (%d)\n' % time())
print 'something'
<tests>
*** Settings ***
Library foo.py
*** Test Cases ***
Test 1
[Timeout] 3 seconds
foo
Test 2
Sleep 10 seconds
-->
'something' is printed during the second tests sleep operation and also the
console will show that the sleep operation in the thread goes until the end.