The way that simple mutex is implemented means that there is no guarantee of the order, i.e.,
const say = async (word: string) => {
const release = await lock(redis, 'say');
console.log(word);
await release();
}
Promise.all([
say('a'),
say('b'),
say('c')
]);
There is no guarantee that the output of this will be a, b c