Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>Lock#lock

Dark deno-powered completion framework for neovim/Vim
Go to Latest
method Lock.prototype.lock
import { Lock } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";

Acquires the lock and applies the given function to the shared value, returning the result.

Parameters

f: (value: T) => R | PromiseLike<R>
  • The function to apply to the shared value.

Returns

Promise<R>

A Promise that resolves with the result of the function.