Axios Response Interceptor

Table of contents

  1. TOC

Orka provides a helper utility to aqcuire a lock during asynchronous operations.

Usage

const { helpers } = '@workablehr/orka';
const lock = helpers.getLock('update');
await doUpdate();
await moreAsyncWork();
lock.release();

This is espcecially useful when some shared state is needed between the async operations and no other flow should change this state.