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

UniTaskCompletionSource and AutoResetUniTaskCompletionSource example code #581

Open
kenofori opened this issue May 5, 2024 · 0 comments

Comments

@kenofori
Copy link

kenofori commented May 5, 2024

Hi there,
Could you please explain if following approach automatically returns the newly created instance to pool? If not could you please provide code example.
Thanks

public UniTask<int> WrapByUniTaskCompletionSource()
{
            var test = AutoResetUniTaskCompletionSource<int>.Create();
            test.TrySetResult(33);
            return await test.Task;
}
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

1 participant