GPhpThread - a heavy threads implementation in pure PHP - Documentation

GPhpThreadNotCloneableContainer
in package
implements Serializable

FinalYes

A data container not allowed to be cloned.

Once created, only REFERENCEs to it are allowed. It is NOT protected against fork or direct import()/export(). If that is desired it should be wrapped.

Tags
throws
GPhpThreadException

When caught clone attempts.

Table of Contents

Interfaces

Serializable

Properties

$variable  : mixed

Methods

__construct()  : mixed
Constructor.
__toString()  : string
Generates object id.
export()  : mixed
Returns the contained value.
import()  : void
Sets the value desired to be held.

Properties

$variable

private mixed $variable

The container holding the user's value

Methods

__construct()

Constructor.

public __construct() : mixed

__toString()

Generates object id.

public final __toString() : string
Return values
string

The id of the current instance.

export()

Returns the contained value.

public export() : mixed
Return values
mixed

The contained value.

import()

Sets the value desired to be held.

public import(mixed $value) : void
Parameters
$value : mixed

The value to be held inside this container.

Tags
throws
GPhpThreadException

If an instance of \GPhpThreadNotCloneableContainer is passed.


        
On this page

Search results