On 02/09/2013 06:47, Florian Weimer wrote:
- Phil Clayton:
I think this delay is actually when exiting Poly/ML. I have just this moment hit Ctrl+D to exit poly in a terminal but, as nothing happened immediately, I hit it again. In fact, both key strokes registered and I zapped the terminal. (It seems I really am that impatient!)
I pressed ^D quickly followed by ^C in GDB, and ended up with this on the call stack:
// Now release schedLock and wait for a thread // to wake us up. Use a timed wait to avoid the race with // setting exitRequest. initialThreadWait.WaitFor(&schedLock, 400);
I guess that's where those 400 milliseconds come from. :-/
Surely there's a better way to do this.
I'm fairly sure the problem is in commit 1835. There's a race condition there associated with initialThreadWait.Signal() and setting the threadExited flag. I'll try and deal with this and the other problems over the next few days.
David