Re: Lock or critical section

From: Date: Tue, 21 Sep 2004 12:01:33 +0000
Subject: Re: Lock or critical section
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-197408@lists.php.net to get a copy of this message
In article <1095761537.414ffe81765ac@imp.online.net>, skippy@zuavra.net (Skippy) wrote: > Quoting Jean-Yves <contact@terreorange.com>: > > Is there a documented way to create in PHP a critical section: I want a > > piece of code to not be executed in the same time several times? > > Give us a set of criteria and we'll see about it. I want to do something like that : LOCK code UNLOCK The first user locks and runs the code. If another user tries to run the code before the lock is off, he is blocked. Perhaps I can use the flock mechanism! Thanks. Kind regards, Jean-Yves http://www.j2s.net ------------------------------------------

« previous php.general (#197408) next »