Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass argument to my async function #1

Closed
Rayyan98 opened this issue Jan 5, 2023 · 1 comment
Closed

How to pass argument to my async function #1

Rayyan98 opened this issue Jan 5, 2023 · 1 comment

Comments

@Rayyan98
Copy link

Rayyan98 commented Jan 5, 2023

Is this the intended way to pass arguments to my async function or is there any other way to do it

myWrapperFunction(someArg1, someArg2) {
  AsyncContext.run(() => myIntendedFunction(someArg1, someArg2), [], yourGlobalContext);
}
@MGB247
Copy link
Owner

MGB247 commented Jan 5, 2023

That's exactly how you would do it 🙂

@MGB247 MGB247 closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants