```js await locks.request('A', { timeout: 5000 }, async () => { // resource will be released if this function will not end before timeout }); ```