Add ValueTask.AsUniTask only for .NET Core
parent
da7e9fc4b3
commit
6dfb969015
|
@ -15,5 +15,16 @@ namespace Cysharp.Threading.Tasks
|
||||||
{
|
{
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static UniTask<T> AsUniTask<T>(this ValueTask<T> task, bool useCurrentSynchronizationContext = true)
|
||||||
|
{
|
||||||
|
// NOTE: get _obj and _token directly for low overhead conversion but not yet implemented.
|
||||||
|
return task.AsTask().AsUniTask(useCurrentSynchronizationContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UniTask AsUniTask(this ValueTask task, bool useCurrentSynchronizationContext = true)
|
||||||
|
{
|
||||||
|
return task.AsTask().AsUniTask(useCurrentSynchronizationContext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue