Wraps a function with singleton behavior to prevent duplicate concurrent calls
This decorator ensures that if the same function is called with the same arguments
while a previous call is still pending, it returns the existing promise instead
of making a new call.
Wraps a function with singleton behavior to prevent duplicate concurrent calls
This decorator ensures that if the same function is called with the same arguments while a previous call is still pending, it returns the existing promise instead of making a new call.