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

Update Awaitable.Threading.cs #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Thaina
Copy link

@Thaina Thaina commented Oct 22, 2024

Expose MainThreadSynchronizationContext so we can use in Task and similar API that can accept SynchronizationContext to return to main thread

Add helper extension method to Task for conveniently scheduling task in one line

var fireUser = await FirebaseAuth.DefaultInstance.SignInWithCredentialAsync(GoogleAuthProvider.GetCredential(user.IdToken,null));
await Awaitable.MainThreadAsync();
Debug.Log(fireUser);

// Instead
Debug.Log(await FirebaseAuth.DefaultInstance.SignInWithCredentialAsync(GoogleAuthProvider.GetCredential(user.IdToken,null)).OnMainThread());

Unity Technologies and others added 2 commits October 16, 2024 23:50
Expose `MainThreadSynchronizationContext` so we can use in `Task` and similar API that can accept `SynchronizationContext` to return to main thread

Add helper extension method to `Task` for conveniently scheduling task in one line
@qingshu
Copy link

qingshu commented Oct 22, 2024 via email

@unity-emilk unity-emilk force-pushed the master branch 2 times, most recently from ac359b9 to 59e16ee Compare October 31, 2024 15:31
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

Successfully merging this pull request may close these issues.

2 participants