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

search for in the

sem_get> <msg_stat_queue
Last updated: Fri, 13 Nov 2009

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
13-Apr-2004 09: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> <msg_stat_queue
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites