Executes the given function within the specified context.
This method ensures the provided context is active during function execution,
making it accessible to get() calls within the function and any nested function calls.
When the function completes, the previous context (if any) is restored.
Useful for:
Note: This method is used for both asynchronous and synchronous execution.
The context value to set for the duration of the function execution
The function to execute within the context
The return value of the executed function
IMPORT_PATH:
"@daiso-tech/core/execution-context/als-execution-context-adapter"Execution context adapter using Node.js AsyncLocalStorage.
This adapter implements context storage using Node.js's AsyncLocalStorage API, which provides automatic context propagation across async boundaries. It ensures context values are maintained correctly through promises, callbacks, and other asynchronous operations.
Recommended for Node.js environments where async context isolation is needed.