类:LockManager


【Class: LockManager

LockManager 接口提供了用于请求和检查锁的方法。要获取 LockManager 实例,请使用

【The LockManager interface provides methods for requesting and introspecting locks. To obtain a LockManager instance use】

import { locks } from 'node:worker_threads';'use strict';

const { locks } = require('node:worker_threads');

此实现与 浏览器 LockManager API 匹配。

【This implementation matches the browser LockManager API.】