PHP 8.1.0 RC 4 available for testing


(PECL pht >= 0.0.1)

pht\Vector::unlockReleases the vector's mutex lock


public pht\Vector::unlock(): void

This method will release the mutex lock associated with the vector.

Liste de param├Ętres

Cette fonction ne contient aucun param├Ętre.

Valeurs de retour

No return value.


Exemple #1 Locking a vector's mutex lock


use pht\{ThreadVector};

$thread = new Thread();
$vector = new Vector();

$thread->addFunctionTask(function ($vector) {
$vector[] = 1;


// $vector is currently being used by multiple threads
$vector[] = 2;


add a note add a note

User Contributed Notes

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