First of all, a rollback is what I don't care about.
I would like to be able to block a sequence of asynchronous functions / promises / tasks (call it a "transaction") with the name / id (or an array of names) so that they happen sequentially, and therefore any other "transaction" with the same name (s), which are executed by another part of the system, is delayed from the beginning to the end of the current transaction using the same name. Thus, it basically performs the sequence of asynchronous tasks or transactions.
Here is a sample code:
function a()
{
return new Promise();
}
function b()
{
return new Promise();
}
function c()
{
return a.then(() => b());
}
a, b c, , , c b, c b.
npm, , , , - -, , ?