« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 8 of about 8 for semaphore (0.003 sec.)
SyncSemaphore::__construct — Constructs a new SyncSemaphore object | PHP 8.3 12326
SyncSemaphore::__construct (PECL sync >= 1.0.0) SyncSemaphore::__construct — Constructs a new SyncSemaphore object 説明 public function SyncSemaphore::__construct ( string $name = ? , int $initialval = 1 , bool $autounlock = true ) Construc ... ts a named or unnamed semaphore. パラメータ name The name of the semaphore if this is a named semaphore object. 注意 : If the name already exists, it must ... process is running as or an exception will be thrown with a meaningless error message. initialval The initial value of the semaphore. This is the number of locks that may be obtained. autounlock Specifies whether or not to automatically unlock the semapho ... re at the conclusion of the PHP script. 警告 If an object is: A named semaphore with an autounlock of false , the object is locked, and the PHP script concludes before the object is unlocked, then the u ...
https://man.mtool.work/php/8.3/syncsemaphore.construct.html
SyncSemaphore::lock — Decreases the count of the semaphore or waits | PHP 8.3 10935
SyncSemaphore::lock (PECL sync >= 1.0.0) SyncSemaphore::lock — Decreases the count of the semaphore or waits 説明 public function SyncSemaphore::lock ( int $wait = -1 ): bool Decreases the count of a SyncSemaphore object or waits until the ... semaphore becomes non-zero. パラメータ wait The number of milliseconds to wait for the semaphore. A value of -1 is infinite. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 SyncSemaphore::lock() ... example <?php $semaphore = new SyncSemaphore ( "LimitedResource_2clients" , 2 ); if (! $semaphore -> lock ( 3000 )) { echo "Unable to lock semaphor ... e." ; exit(); } /* ... */ $semaphore -> unlock (); ?> 参考 SyncSemaphore::unlock() - Increases the count of the semaphore 他のマニュアルの関連ページ Linux JM s ...
https://man.mtool.work/php/8.3/syncsemaphore.lock.html
SyncSemaphore::unlock — Increases the count of the semaphore | PHP 8.3 10465
SyncSemaphore::unlock (PECL sync >= 1.0.0) SyncSemaphore::unlock — Increases the count of the semaphore 説明 public function SyncSemaphore::unlock ( int &$prevcount = ? ): bool Increases the count of a SyncSemaphore object. パラメータ prevc ... ount Returns the previous count of the semaphore. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 SyncSemaphore::unlock() example <?php $semaphore ... = new SyncSemaphore ( "LimitedResource_2clients" , 2 ); if (! $semaphore -> lock ( 3000 )) { echo "Unable to lock semaphore." ; exit(); } /* . ... .. */ $semaphore -> unlock (); ?> 参考 SyncSemaphore::lock() - Decreases the count of the semaphore or waits 他のマニュアルの関連ページ Lin ...
https://man.mtool.work/php/8.3/syncsemaphore.unlock.html
The SyncSemaphore class | PHP 8.3 8422
The SyncSemaphore class (PECL sync >= 1.0.0) はじめに A cross-platform, native implementation of named and unnamed semaphore objects. A semaphore restricts access to a limited resource to a limited number of instances. Semaphores differ fro ... than one instance to access a resource at one time while a mutex only allows one instance at a time. クラス概要 class SyncSemaphore { /* メソッド */ public function __construct ( string $name = ? , int $initialval = 1 , bool $autounlock = true ) public f ... unction lock ( int $wait = -1 ): bool public function unlock ( int &$prevcount = ? ): bool } 目次 SyncSemaphore::__construct — Constructs a new SyncSemaphore object SyncSemaphore::lock — Decreases the count of the semaphore or waits S ... yncSemaphore::unlock — Increases the count of the semaphore 他のマニュアルの関連ページ Linux JM access(2) Linux JM sync(2) Linux JM loc ...
https://man.mtool.work/php/8.3/class.syncsemaphore.html
sem_acquire — セマフォを得る | PHP 8.3 7753
sem_acquire (PHP 4, PHP 5, PHP 7, PHP 8) sem_acquire — セマフォを得る 説明 function sem_acquire ( SysvSemaphore $semaphore , bool $non_blocking = false ): bool sem_acquire() はデフォルトで、(必要な場合) セマフォが確保できるまでブロックします ... ロセスにより獲得された全てのセマフォのうち、 明示的に解放されていないものが自動的に解放され、警告が表示されます。 パラメータ semaphore semaphore はセマフォのリソースで、 sem_get() によって得られます。 non_blocking セマフォが確保できるまでプロセスを待たせたく ... 時に false を返します。 戻り値 成功した場合に true を、失敗した場合に false を返します。 変更履歴 バージョン 説明 8.0.0 引数 semaphore は、 SysvSemaphore クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソースが期待されていまし ...
https://man.mtool.work/php/8.3/function.sem-acquire.html
sem_remove — セマフォを削除する | PHP 8.3 7555
sem_remove (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) sem_remove — セマフォを削除する 説明 function sem_remove ( SysvSemaphore $semaphore ): bool sem_remove() は、指定したセマフォを削除します。 セマフォを削除した後、そのセマフォにはもうアクセスで ... きません。 パラメータ semaphore sem_get() が返すセマフォ。 戻り値 成功した場合に true を、失敗した場合に false を返します。 変更履歴 バージョン 説明 8.0.0 ... 引数 semaphore は、 SysvSemaphore クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソースが期待されていまし ...
https://man.mtool.work/php/8.3/function.sem-remove.html
sem_release — セマフォを解放する | PHP 8.3 7500
sem_release (PHP 4, PHP 5, PHP 7, PHP 8) sem_release — セマフォを解放する 説明 function sem_release ( SysvSemaphore $semaphore ): bool sem_release() は、そのセマフォが コール元のプロセスにより現在確保されている場合、解放します。 そうでない場 ... 合、警告が表示されます。 セマフォを解放した後、再び確保するには、 sem_acquire() をコールします。 パラメータ semaphore sem_get() が返すセマフォ。 戻り値 成功した場合に true を、失敗した場合に false を返します。 変更履歴 バージョン 説明 8.0.0 ... 引数 semaphore は、 SysvSemaphore クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソースが期待されていまし ...
https://man.mtool.work/php/8.3/function.sem-release.html
Sync | PHP 8.3 7265
Sync はじめに The sync extension introduces cross-platform synchronization objects into PHP. Named and unnamed Mutex, Semaphore, Event, Reader-Writer, and named Shared Memory objects provide OS-level synchronization on both POSIX (e.g. Linu ... Constructs a new SyncMutex object SyncMutex::lock — Waits for an exclusive lock SyncMutex::unlock — Unlocks the mutex SyncSemaphore — The SyncSemaphore class SyncSemaphore::__construct — Constructs a new SyncSemaphore object SyncSemaphore::lock — Decreas ... es the count of the semaphore or waits SyncSemaphore::unlock — Increases the count of the semaphore SyncEvent — The SyncEvent class SyncEvent::__constru ...
https://man.mtool.work/php/8.3/book.sync.html
PREV 1 NEXT