LocalMutex | WebHare Platform SDKWebHare Platform SDKPreparing search index...@webhare/stdLocalMutexClass LocalMutexA mutex which is only visible in the current JavaScript VM Exampleconst mutex = new LocalMutex;using lock = await mutex.lock();lock.release();// If you'll be relying on automatic releaseusing lock = await mutex.lock();void(lock); Copy IndexConstructorsconstructor Methods[unlock] lock Constructorsconstructornew LocalMutex(): LocalMutexReturns LocalMutexMethods[unlock]"[unlock]"(): voidReturns voidlocklock(): Promise<LocalLock>Lock this mutex Returns Promise<LocalLock>Lock object. Use with using to ensure automatic unlock SettingsMember VisibilityProtectedInheritedThemeOSLightDarkOn This PageConstructorsconstructorMethods[unlock]lockWebHare Platform SDKLoading...
A mutex which is only visible in the current JavaScript VM
Example