in reply to Re^2: flock on Windows : process killed while in critical region
in thread flock on Windows : process killed while in critical region
I guess a sleep time of a couple of seconds between two calls to flock would not be considered tight anymore, i.e. it would be safe?
Even half a second or just sleep 0 (which causes the process to relinquish it's current timeslice) will ensure the OS gets processor time to clean up the dying process.
The situation where things go wrong is when you have multiple processes all polling in tight loops, thus not giving the (lower priority) task of cleaning up the terminating process a look in.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: flock on Windows : process killed while in critical region
by bulk88 (Priest) on Dec 16, 2012 at 04:28 UTC | |
by BrowserUk (Patriarch) on Dec 16, 2012 at 11:04 UTC | |
by bulk88 (Priest) on Dec 16, 2012 at 17:23 UTC | |
by BrowserUk (Patriarch) on Dec 16, 2012 at 18:28 UTC |