Thursday, 13 August 2020

Queuing calls to a function

Hey guys ,Is there any way to queue calls to a function,so that the next function call doesn't execute until the previous function call is returned Some context - I am using mongodb to maintain a "collection sequence" collection which stores Incrementing unique keys , so I don't want two records getting the same value from the function and cause a conflict while inserting.I knows it's a bottleneck but the project required auto Incrementing ID. Using Nestjs as framework,Thanks in advance

Submitted August 13, 2020 at 07:28PM by melgo44

No comments:

Post a Comment