requestAsync
The request() method of the LockManager interface requests a Lock object with parameters specifying its name and characteristics. The requested Lock is passed to a callback, while the function itself returns a Promise that resolves (or rejects) with the result of the callback after the lock is released, or rejects if the request is aborted.
fun <T : JsAny?> requestAsync(name: String, options: LockOptions, callback: LockGrantedCallback<T>): Promise<T>(source)