You are here: Re: flock and blocking « PHP Programming Language « IT news, forums, messages
Re: flock and blocking

Posted by yawnmoth on 10/31/07 15:21

On Oct 31, 10:16 am, yawnmoth <terra1...@yahoo.com> wrote:
> If I do flock($fp, LOCK_EX) on a file and another user tries to do
> file_get_contents on that file while it's locked, will
> file_get_contents block until the lock has been removed?

Also, does file_get_contents lock files? What would happen if a
script tried to lock a file with an exclusive lock (LOCK_EX) while
another instance of the script was reading it? Would the flock
operation block until it had exclusive access? Would the script doing
the reading suddenly stop? Would the script doing the reading
suddenly read different data?

Thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация