FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update Awaitable.Threading.cs by Thaina · Pull Request #35 · Unity-Technologies/UnityCsReference · GitHub

Update Awaitable.Threading.cs - #35

Open
Thaina wants to merge 2 commits into
Unity-Technologies:masterfrom
Thaina:patch-3
Open

Update Awaitable.Threading.cs#35
Thaina wants to merge 2 commits into
Unity-Technologies:masterfrom
Thaina:patch-3

Conversation

Thaina commented Oct 22, 2024
edited
Loading

Copy link
Copy Markdown

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 commented Oct 22, 2024 via email

Copy link
Copy Markdown

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL