pht\AtomicInteger::__construct

(PECL pht >= 0.0.1)

pht\AtomicInteger::__constructAtomicInteger creation

说锟斤拷

public pht\AtomicInteger::__construct ([ int $value = 0 ] ) : AtomicInteger

Handles the creation of a new atomic integer.

锟斤拷锟斤拷

value

The value to initialise the atomic integer to.

锟斤拷锟斤拷值

No return value.

锟斤拷锟斤拷

Example #1 Creating a new atomic integer

<?php

use pht\AtomicInteger;

$atomicInteger = new AtomicInteger(100);

var_dump($atomicInteger->get());

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

int(100)