perl-5.38.0
lock THING

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

この関数は THING が含む共有変数またはリファレンスされたオブジェクトに、 スコープから出るまでアドバイサリロックを掛けます.

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

返される値は、引数がスカラならそのスカラ自身、引数がハッシュ、配列、 サブルーチンならリファレンスです。

lock is a "weak keyword"; this means that if you've defined a function by this name (before any calls to it), that function will be called instead. If you are not under use threads::shared this does nothing. See threads::shared.

lock は「弱いキーワード」です; もしユーザーが(呼び出し前に) この名前で関数を定義すると、定義された関数の方が呼び出されます。 use threads::shared の影響下でない場合は、これは何もしません。 threads::shared を参照してください。