[Unwrap] add ConfigureAwait
parent
87dd5f13fd
commit
65622b01f6
|
@ -742,21 +742,41 @@ namespace Cysharp.Threading.Tasks
|
||||||
return await await task;
|
return await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async UniTask<T> Unwrap<T>(this Task<UniTask<T>> task, bool continueOnCapturedContext)
|
||||||
|
{
|
||||||
|
return await await task.ConfigureAwait(continueOnCapturedContext);
|
||||||
|
}
|
||||||
|
|
||||||
public static async UniTask Unwrap(this Task<UniTask> task)
|
public static async UniTask Unwrap(this Task<UniTask> task)
|
||||||
{
|
{
|
||||||
await await task;
|
await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async UniTask Unwrap(this Task<UniTask> task, bool continueOnCapturedContext)
|
||||||
|
{
|
||||||
|
await await task.ConfigureAwait(continueOnCapturedContext);
|
||||||
|
}
|
||||||
|
|
||||||
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task)
|
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task)
|
||||||
{
|
{
|
||||||
return await await task;
|
return await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task, bool continueOnCapturedContext)
|
||||||
|
{
|
||||||
|
return await (await task).ConfigureAwait(continueOnCapturedContext);
|
||||||
|
}
|
||||||
|
|
||||||
public static async UniTask Unwrap(this UniTask<Task> task)
|
public static async UniTask Unwrap(this UniTask<Task> task)
|
||||||
{
|
{
|
||||||
await await task;
|
await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async UniTask Unwrap(this UniTask<Task> task, bool continueOnCapturedContext)
|
||||||
|
{
|
||||||
|
await (await task).ConfigureAwait(continueOnCapturedContext);
|
||||||
|
}
|
||||||
|
|
||||||
#if UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3_OR_NEWER
|
||||||
|
|
||||||
sealed class ToCoroutineEnumerator : IEnumerator
|
sealed class ToCoroutineEnumerator : IEnumerator
|
||||||
|
|
Loading…
Reference in New Issue