Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: sem_acquire - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sem_get" width="11" height="7"/> <msg_stat_queue
Last updated: Fri, 10 Oct 2008

view this page in

sem_acquire

(PHP 4, PHP 5)

sem_acquireセマフォを得る

説明

bool sem_acquire ( resource $sem_identifier )

sem_acquire() は、(必要な場合) セマフォが確保できるまでブロックします。 既に確保されているセマフォを得ようとするプロセスは、 セマフォの獲得により max_aquire 値を超える場合、 永久にブロックされます。

リクエスト処理の後、プロセスにより獲得された全てのセマフォのうち、 明示的に開放されていないものが自動的に開放され、警告が表示されます。

パラメータ

sem_identifier

sem_identifier はセマフォのリソースで、 sem_get() によって得られます。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。



add a note add a note User Contributed Notes
sem_acquire
gladd at trash dot eris dot qinetiq dot com
14-Apr-2004 06:02
Just to clarify what is meant by "process" above:

On the Apache webserver, many PHP requests will be executed within the same process space because it is multithreaded. However, any semaphores got and acquired by a script and not released and removed will still be automatically cleaned up by the PHP interpreter each time the script terminates.

Remove any trash before emailing!

sem_get" width="11" height="7"/> <msg_stat_queue
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites