asyncHook.disable()


禁用给定 AsyncHook 实例的回调,使其不会从全局 AsyncHook 回调池中执行。一旦钩子被禁用,它将不会再次被调用,直到重新启用。

【Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.】

为了 API 一致性,disable() 也会返回 AsyncHook 实例。

【For API consistency disable() also returns the AsyncHook instance.】