Results of 1 - 8 of about 8 for SyncSharedMemory (0.001 sec.)
- SyncSharedMemory::size — Returns the size of the named shared memory | PHP 8.3 10645
- SyncSharedMemory::size (PECL sync >= 1.1.0) SyncSharedMemory::size — Returns the size of the named shared memory 説明 public function SyncSharedMemory::size (): int Retrieves the shared memory size of a SyncSharedMemory object. パラメータ こ
... An integer containing the size of the shared memory. This will be the same size that was passed to the constructor. 例 例1 SyncSharedMemory::size() example <?php $mem = new SyncSharedMemory ( "AppReportName" , 1024 ); var_dump ( $mem -> size ()); ?> 上の例の出力 ... は、 たとえば以下のようになります。 int(1024) 参考 SyncSharedMemory::__construct() - Constructs a new SyncSharedMemory object SyncSharedMemory::write() - Copy data to named shared memory Syn ...
-
https://man.mtool.work/php/8.3/syncsharedmemory.size.html
- SyncSharedMemory::__construct — Constructs a new SyncSharedMemory object | PHP ... 10483
- SyncSharedMemory::__construct (PECL sync >= 1.1.0) SyncSharedMemory::__construct — Constructs a new SyncSharedMemory object 説明 public function SyncSharedMemory::__construct ( string $name , int $size ) Constructs a named shared memory obj
... emory to reserve. 注意 : The amount of memory cannot be resized later. Request sufficient storage up front. 戻り値 The new SyncSharedMemory object. エラー / 例外 An exception is thrown if the shared memory object cannot be created or opened. 例 例1 SyncSharedMem ... memory with other synchronization objects. // Shared memory goes away when the last reference to it disappears. $mem = new SyncSharedMemory ( "AppReportName" , 1024 ); if ( $mem -> first ()) { // Do first time initialization work here. } $result = $mem -> write ... ( json_encode (array( "name" => "my_report.txt" ))); ?> 参考 SyncSharedMemory::first() - Check to see if the object is the first instance system-wide of named shared memory SyncSharedMemory::size() - ...
-
https://man.mtool.work/php/8.3/syncsharedmemory.construct.html
- SyncSharedMemory::first — Check to see if the object is the first instance syst... 9832
- SyncSharedMemory::first (PECL sync >= 1.1.0) SyncSharedMemory::first — Check to see if the object is the first instance system-wide of named shared memory 説明 public function SyncSharedMemory::first (): bool Retrieves the system-wide first
... instance status of a SyncSharedMemory object. パラメータ この関数にはパラメータはありません。 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 ... 例1 SyncSharedMemory::first() example <?php $mem = new SyncSharedMemory ( "AppReportName" , 1024 ); if ( $mem -> first ()) { // Do first time i ... nitialization work here. } var_dump ( $mem -> first ()); $mem2 = new SyncSharedMemory ( "AppReportName" , 1024 ); var_dump ( $mem2 -> first ()); ?> 上の例の出力は、 たとえば以下のようになります。 bool(true) b ...
-
https://man.mtool.work/php/8.3/syncsharedmemory.first.html
- SyncSharedMemory::read — Copy data from named shared memory | PHP 8.3 9724
- SyncSharedMemory::read (PECL sync >= 1.1.0) SyncSharedMemory::read — Copy data from named shared memory 説明 public function SyncSharedMemory::read ( int $start = 0 , int $length = ? ) Copies data from named shared memory. パラメータ start
... er of bytes from the end of the shared memory segment. 戻り値 A string containing the data read from shared memory. 例 例1 SyncSharedMemory::__construct() example <?php // You will probably need to protect shared memory with other synchronization objects. // Sha ... red memory goes away when the last reference to it disappears. $mem = new SyncSharedMemory ( "AppReportName" , 1024 ); if ( $mem -> first ()) { // Do first time initialization work here. } $result = $mem -> write ... = $mem -> read ( 3 , - 4 ); var_dump ( $result ); ?> 上の例の出力は、 たとえば以下のようになります。 string(3) "ort" 参考 SyncSharedMemory::__construct() - Constructs a new SyncSharedMemory object SyncSharedMemory::first() - Check to see if the object is the fi ...
-
https://man.mtool.work/php/8.3/syncsharedmemory.read.html
- SyncSharedMemory::write — Copy data to named shared memory | PHP 8.3 9669
- SyncSharedMemory::write (PECL sync >= 1.1.0) SyncSharedMemory::write — Copy data to named shared memory 説明 public function SyncSharedMemory::write ( string $string = ? , int $start = 0 ) Copies data to named shared memory. パラメータ stri
... om the end of the shared memory segment. 戻り値 An integer containing the number of bytes written to shared memory. 例 例1 SyncSharedMemory::write() example <?php // You will probably need to protect shared memory with other synchronization objects. // Shared me ... mory goes away when the last reference to it disappears. $mem = new SyncSharedMemory ( "AppReportName" , 1024 ); if ( $mem -> first ()) { // Do first time initialization work here. } $result = $mem -> write ... write ( "report.txt" , - 3 ); var_dump ( $result ); ?> 上の例の出力は、 たとえば以下のようになります。 int(10) int(3) 参考 SyncSharedMemory::__construct() - Constructs a new SyncSharedMemory object SyncSharedMemory::first() - Check to see if the object is the fi ...
-
https://man.mtool.work/php/8.3/syncsharedmemory.write.html
- The SyncSharedMemory class | PHP 8.3 9181
- The SyncSharedMemory class (PECL sync >= 1.1.0) はじめに A cross-platform, native, consistent implementation of named shared memory objects. Shared memory lets two separate processes communicate without the need for complex pipes or sockets
... ative. Synchronization objects (e.g. SyncMutex) are still required to protect most uses of shared memory. クラス概要 class SyncSharedMemory { /* メソッド */ public function __construct ( string $name , int $size ) public function first (): bool public function r ... = 0 , int $length = ? ) public function size (): int public function write ( string $string = ? , int $start = 0 ) } 目次 SyncSharedMemory::__construct — Constructs a new SyncSharedMemory object SyncSharedMemory::first — Check to see if the object is the first ... instance system-wide of named shared memory SyncSharedMemory::read — Copy data from named shared memory SyncSharedMemory::size — Returns the size of the named shared memory SyncShared ...
-
https://man.mtool.work/php/8.3/class.syncsharedmemory.html
- Sync | PHP 8.3 8043
- 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
... lock SyncReaderWriter::writelock — Waits for an exclusive write lock SyncReaderWriter::writeunlock — Releases a write lock SyncSharedMemory — The SyncSharedMemory class SyncSharedMemory::__construct — Constructs a new SyncSharedMemory object SyncSharedMemory::fi ... rst — Check to see if the object is the first instance system-wide of named shared memory SyncSharedMemory::read — Copy data from named shared memory SyncSharedMemory::size — Returns the size of the named shared memory SyncShared ...
-
https://man.mtool.work/php/8.3/book.sync.html
- プロセス制御 | PHP 8.3 4681
- プロセス制御 Eio インストール/設定 定義済み定数 例 Eio 関数 Ev インストール/設定 例 ウォッチャー ウォッチャーのコールバック Periodic ウォッチャーの操作モード Ev — Ev クラス EvCheck — EvCheck クラス EvChild — EvChild クラス EvEmbed — EvEmbed
... lass SyncSemaphore — The SyncSemaphore class SyncEvent — The SyncEvent class SyncReaderWriter — The SyncReaderWriter class SyncSharedMemory — The SyncSharedMemory class 他のマニュアルの関連ページ Linux JM expect(1) Linux JM sync(1) Linux JM sync(2) Linux JM sem_ ...
-
https://man.mtool.work/php/8.3/refs.fileprocess.process.html
PREV
1
NEXT