PHPKonf Istanbul PHP Conference 2019 - Call for Papers

The Vector class

(PECL pht >= 0.0.1)

はじめに

The pht\Vector class is one of the Inter-Thread Communication (ITC) data structures exposed by pht. It can be safely passed around between threads, and manipulated by multiple threads using the mutex locks that have been packed in with the data structure. It is reference-counted across threads, and so is does not need to be explicitly destroyed.

The pht\Vector class enables for array access upon its objects (along with the isset() and unset() functions). The ArrayAccess interface is not explicitly implemented, however, because it is only needed for such abilities by userland classes.

クラス概要

pht\Vector implements pht\Threaded {
/* メソッド */
public Vector __construct ([ int $size = 0 [, mixed $value = 0 ]] )
public void deleteAt ( int $offset )
public void insertAt ( mixed $value , int $offset )
public void lock ( void )
public mixed pop ( void )
public void push ( mixed $value )
public void resize ( int $size [, mixed $value = 0 ] )
public mixed shift ( void )
public int size ( void )
public void unlock ( void )
public void unshift ( mixed $value )
public void updateAt ( mixed $value , int $offset )
}

目次

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top