PHP » GoLang |
login |
register |
about
|
GoLang pht\AtomicInteger::lock
request it (534)
GoLang replacement for PHP's pht\AtomicInteger::lock
[edit | history]
pht\AtomicInteger::lock(PECL pht >= 0.0.1) pht\AtomicInteger::lock — Acquires the atomic integer's mutex lock Description
public void pht\AtomicInteger::lock
( void
)
This method will acquire the mutex lock associated with the atomic integer. The mutex lock only needs to be acquired when needing to group together multiple operations. The mutex locks of the atomic values are reentrant safe. It is therefore valid for the same thread to reacquire a mutex lock that it has already acquired. ParametersThis function has no parameters. Return ValuesNo return value. Examples
Example #1 Grouping together an atomic integer's operations (requiring a mutex lock)
<?php The above example will output: int(4) |
more
Recently updated
more
Most requested
more
Last requests
|