Re: Shared memory, mutex functionality and spawning threads. Is it possible using PHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kent Larsson wrote:

> In absence of shared memory and threads. What I really must have is
> some kind of mutex functionality. I will be manipulating files on disk
> and I don't want two instances to be able to touch the disk at the
> same time. 

Touch the disk or touch the file?  I assume you meant the latter, i.e.
you don't want two instances to operate on the same file concurrently. 

> Is there something I could use for mutual exclusion? If 
> there aren't any dedicated methods, are there 100% reliable
> workarounds?

Look up file locking.  In fact, this was the topic of a very recent
thread.


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux