in reply to Re: Planning a Disk CleanUp Script
in thread Planning a Disk CleanUp Script
Use random integers, not sequential ones.
With sequential integers you have a race conditions. If 2 instances are trying to start at once, both can choose the same name and try to write to it, with bad results. Choose random integers and then test whether that one exists already and the odds of a bad race falls by several orders of magnitude.
Either that or have the integer in question produced by a single source, such as an autoincrement field in a database.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 2: Planning a Disk CleanUp Script
by theguvnor (Chaplain) on Jan 15, 2002 at 07:41 UTC |