Jump to content

Perl Programming/Keywords/lock

From Wikibooks, open books for an open world
Previous: localtime Keywords Next: log

The lock keyword

[edit | edit source]

THE lock function places an advisory lock on the shared variable or referenced object contained in THING until the lock goes out of scope.

If the argument is a scalar, the value returned is the scalar itself, or a reference, if the argument is an array, hash, or a subroutine.

Syntax

[edit | edit source]
  lock THING


Previous: localtime Keywords Next: log