This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
overhaul UniRx.Async, introduce IAwaitable<T>, IAwaiter<T> and suppor…
…t with WhenAll/WhenAny
- Loading branch information
Showing
19 changed files
with
6,676 additions
and
297 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#if (NET_4_6 || NET_STANDARD_2_0) | ||
#pragma warning disable CS1591 | ||
|
||
using System.Runtime.CompilerServices; | ||
|
||
namespace UniRx.Async | ||
{ | ||
// This interfaces used by UniTask.WhenAll/WhenAny | ||
// If implement this interface and if awaiter/awaitable can be struct, | ||
// use explicit-interface-implementation. | ||
|
||
public interface IAwaitable | ||
{ | ||
IAwaiter GetAwaiter(); | ||
} | ||
|
||
public interface IAwaitable<out T> : IAwaitable | ||
{ | ||
new IAwaiter<T> GetAwaiter(); | ||
} | ||
|
||
public interface IAwaiter : ICriticalNotifyCompletion | ||
{ | ||
bool IsCompleted { get; } | ||
void GetResult(); | ||
} | ||
|
||
public interface IAwaiter<out T> : IAwaiter | ||
{ | ||
new T GetResult(); | ||
} | ||
} | ||
|
||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"name": "UniRx.Async" | ||
} | ||
{ | ||
"name": "UniRx.Async", | ||
"references": [], | ||
"optionalUnityReferences": [], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false | ||
} |
Oops, something went wrong.