« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 30 for Unlock (0.003 sec.)
SyncMutex::unlock — Unlocks the mutex | PHP 8.3 11713
SyncMutex::unlock (PECL sync >= 1.0.0) SyncMutex::unlock — Unlocks the mutex 説明 public function SyncMutex::unlock ( bool $all = false ): bool Decreases the internal counter of a SyncMutex object. When the internal counter reaches zero, th ... to zero and therefore release the lock. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 SyncMutex::unlock() example <?php $mutex = new SyncMutex ( "UniqueName" ); $mutex -> lock (); /* ... */ $mutex -> unlock (); ?> 参考 SyncMut ...
https://man.mtool.work/php/8.3/syncmutex.unlock.html
SyncSemaphore::unlock — Increases the count of the semaphore | PHP 8.3 11713
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 ... he previous count of the semaphore. 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 SyncSemaphore::unlock() example <?php $semaphore = new SyncSemaphore ( "LimitedResource_2clients" , 2 ); if (! $semaphore -> lock ( 3000 )) { ec ... ho "Unable to lock semaphore." ; exit(); } /* ... */ $semaphore -> unlock (); ?> 参考 SyncSemaphore::lock() - Decreases the count of the semaphore or waits 他のマニュアルの関連ページ Linux JM lock ...
https://man.mtool.work/php/8.3/syncsemaphore.unlock.html
Swoole\Coroutine\Lock::unlock — Release the lock | PHP 8.3 10706
Swoole\Coroutine\Lock::unlock (No version information available, might only be in Git) Swoole\Coroutine\Lock::unlock — Release the lock 説明 public function Swoole\Coroutine\Lock::unlock (): bool Unlock Behavior With io_uring futex: the sys ...
https://man.mtool.work/php/8.3/swoole-coroutine-lock.unlock.html
The Swoole\Coroutine\Lock class | PHP 8.3 10040
The Swoole\Coroutine\Lock class (No version information available, might only be in Git) はじめに Swoole 6.0.1 introduced a coroutine lock that supports inter-process and inter-thread sharing. This lock is designed with non-blocking behavio ... callback functions like onReceive , as this will cause continuous memory growth and lead to memory leaks. 警告 Locking and unlocking must be performed in the same coroutine, otherwise it will break static conditions. クラス概要 class Swoole\Coroutine\L ... ッド */ public function __construct (): void public function lock (): bool public function trylock (): bool public function unlock (): bool } 例 例1 Basic usage <?php use Swoole\Coroutine\Lock ; use Swoole\Coroutine\WaitGroup ; use function Swoole\Corou ... , $waitGroup ) { go (function() use ( $lock , $waitGroup ) { $waitGroup -> add (); $lock -> lock (); sleep ( 1 ); $lock -> unlock (); $waitGroup -> done (); }); go (function() use ( $lock , $waitGroup ) { $waitGroup -> add (); $lock -> lock (); // Wait ...
https://man.mtool.work/php/8.3/class.swoole-coroutine-lock.html
wincache_unlock — 指定したキーの排他ロックを解放する | PHP 8.3 10040
wincache_unlock (PECL wincache >= 1.1.0) wincache_unlock — 指定したキーの排他ロックを解放する 説明 function wincache_unlock ( string $key ): bool 指定したキーに対して、 wincache_lock() を使って取得した排他ロックを解放します。 別のプロセスが ... クをブロックされて待機している場合は、 そのプロセスがロックを取得できるようになります。 警告 wincache_lock() および wincache_unlock() を使っていると、FastCGI のようなマルチプロセス環境において PHP スクリプトがデッドロックを引き起こすことがあります。 本当 ... ックを解放したいキャッシュ内のキーの名前。 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 wincache_unlock() の使用 <?php $fp = fopen ( "/tmp/lock.txt" , "r+" ); if ( wincache_lock ( “lock_txt_lock” )) { // 排他ロックを確保します ... ftruncate ( $fp , 0 ); // ファイルを切り詰めます fwrite ( $fp , "Write something here\n" ); wincache_unlock ( “lock_txt_lock” ); // ロックを解放します } else { echo "Couldn't get the lock!" ; } fclose ( $fp ); ?> 参考 wincache_loc ...
https://man.mtool.work/php/8.3/function.wincache-unlock.html
Swoole\Lock::unlock — Release the lock. | PHP 8.3 9958
Swoole\Lock::unlock (PECL swoole >= 1.9.0) Swoole\Lock::unlock — Release the lock. 説明 public function Swoole\Lock::unlock (): void パラメータ この関数にはパラメータはありません。 戻り値 他のマニュアルの関連ページ Linux JM lock(2) Python a ...
https://man.mtool.work/php/8.3/swoole-lock.unlock.html
EventBuffer::unlock — Releases lock acquired by EventBuffer::lock | PHP 8.3 9698
EventBuffer::unlock (PECL event >= 1.2.6-beta) EventBuffer::unlock — Releases lock acquired by EventBuffer::lock 説明 public function EventBuffer::unlock (): bool Releases lock acquired by EventBuffer::lock() . パラメータ この関数にはパラメ ...
https://man.mtool.work/php/8.3/eventbuffer.unlock.html
wincache_lock — 指定したキーで排他ロックを確保する | PHP 8.3 9114
wincache_lock (PECL wincache >= 1.1.0) wincache_lock — 指定したキーで排他ロックを確保する 説明 function wincache_lock ( string $key , bool $isglobal = false ): bool 指定したキーについての排他ロックを確保します。 ロックを確保するまでは、現在 ... を確保できたら、その後は他のスクリプトから同じキーのロックを要求があってもそれをブロックします。 現在のスクリプトが wincache_unlock() でロックを解放するまでは他のスクリプトからロックを確保できません。 警告 wincache_lock() および wincache_unlock() を使って ... 排他ロックを確保します ftruncate ( $fp , 0 ); // ファイルを切り詰めます fwrite ( $fp , "Write something here\n" ); wincache_unlock ( “lock_txt_lock” ); // ロックを解放します } else { echo "Couldn't get the lock!" ; } fclose ( $fp ); ?> 参考 wincache_unl ... ページ Linux JM flock(2) Linux JM flock(1) Linux JM lockf(3) Python synchronization Linux JM lock(2) Linux JM pthread_mutex_unlock(3) ...
https://man.mtool.work/php/8.3/function.wincache-lock.html
SyncMutex::__construct — Constructs a new SyncMutex object | PHP 8.3 9032
SyncMutex::__construct (PECL sync >= 1.0.0) SyncMutex::__construct — Constructs a new SyncMutex object 説明 public function SyncMutex::__construct ( string $name = ? ) Constructs a named or unnamed countable mutex. パラメータ name The name ... SyncMutex ( "UniqueName" ); if (! $mutex -> lock ( 3000 )) { echo "Unable to lock mutex." ; exit(); } /* ... */ $mutex -> unlock (); ?> 例2 SyncMutex::__construct() unnamed mutex example <?php $mutex = new SyncMutex (); $mutex -> lock (); /* ... */ $m ... utex -> unlock (); ?> 参考 SyncMutex::lock() - Waits for an exclusive lock SyncMutex::unlock() - Unlocks the mutex 他のマニュアルの関連ペ ...
https://man.mtool.work/php/8.3/syncmutex.construct.html
SyncSemaphore::__construct — Constructs a new SyncSemaphore object | PHP 8.3 8789
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 ... ngless 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 semaphore 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 underlying semaphore ... 2clients" , 2 ); if (! $semaphore -> lock ( 3000 )) { echo "Unable to lock semaphore." ; exit(); } /* ... */ $semaphore -> unlock (); ?> 参考 SyncSemaphore::lock() - Decreases the count of the semaphore or waits SyncSemaphore::unlock() - Increases the ...
https://man.mtool.work/php/8.3/syncsemaphore.construct.html
PREV 1 2 3 NEXT