Reply to Re: flock won't non-block at all

Your name:

Reply:


Posted by NC on 09/26/06 17:44

Sven wrote:
>
> It turns out that whenever I was testing my little example
> above, I was opening the script through a browser. For
> some reason the flock() never seems to work for me this
> way, however when I ran it from the command-line php
> things sorted themselves out.

Well, the reason is that inder Windows, scripts executed by an HTTP
server (such as Apache or IIS) run in threads, so it's possible for
multiple instances of a script to run under the same process ID (even
though the thread ID is different). With command-line execution, no
threading takes place; each instance has its own process ID...

Cheers,
NC

[Back to original 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

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