|
Posted by David Haynes on 02/06/06 00:14
David T. Ashley wrote:
> "Colin McKinnon"
> <colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> wrote in
> message news:uhuFf.6096$Dn4.2149@newsfe3-gui.ntli.net...
>> There's not a *better* way, although your proposal is not very efficent
>> (80+
>> bits a time / 18 decimal digits). (I would have used a counter with a
>> mutex)
>
> OK, let's say I do "counter with a mutex".
>
> If I use MySQL to hold the counter, the mutex mechanism is obvious ("LOCK
> TABLE ...").
>
> However, if I hold the counter in a file, what is the best mutex mechanism
> in PHP?
>
> Thanks, Dave.
>
>
>
What's wrong with flock()?
[Back to original message]
|