Now suppose that 'test' was a wedged thread.
- Change the 'sleep 10' in 'test' to 'sleep 30'.
- Change the 'time() + 15' to 'time() + 5'.
- Add a 'print "waiting\n"' before the 'last' statement.
I would expect the 'cond_timedwait' statement to return after 5 seconds and loop over the 'print ..' statement 5-6 times before the 'test' thread returned. Instead I see the 'test' thread start and block the loop until 'test' finishes.
Am I completely misunderstanding how this process works?