mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-15 19:40:09 +00:00
UniTaskVoid can not await.
This commit is contained in:
@@ -4,7 +4,7 @@ using System;
|
||||
|
||||
namespace Cysharp.Threading.Tasks
|
||||
{
|
||||
public struct AsyncUnit : IEquatable<AsyncUnit>
|
||||
public readonly struct AsyncUnit : IEquatable<AsyncUnit>
|
||||
{
|
||||
public static readonly AsyncUnit Default = new AsyncUnit();
|
||||
|
||||
|
||||
@@ -9,41 +9,41 @@ using Cysharp.Threading.Tasks.CompilerServices;
|
||||
namespace Cysharp.Threading.Tasks
|
||||
{
|
||||
[AsyncMethodBuilder(typeof(AsyncUniTaskVoidMethodBuilder))]
|
||||
public struct UniTaskVoid
|
||||
public readonly struct UniTaskVoid
|
||||
{
|
||||
public void Forget()
|
||||
{
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
public Awaiter GetAwaiter()
|
||||
{
|
||||
return new Awaiter();
|
||||
}
|
||||
// [DebuggerHidden]
|
||||
// public Awaiter GetAwaiter()
|
||||
// {
|
||||
// return new Awaiter();
|
||||
// }
|
||||
|
||||
public struct Awaiter : ICriticalNotifyCompletion
|
||||
{
|
||||
[DebuggerHidden]
|
||||
public bool IsCompleted => true;
|
||||
// public struct Awaiter : ICriticalNotifyCompletion
|
||||
// {
|
||||
// [DebuggerHidden]
|
||||
// public bool IsCompleted => true;
|
||||
|
||||
[DebuggerHidden]
|
||||
public void GetResult()
|
||||
{
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
UnityEngine.Debug.LogWarning("UniTaskVoid can't await, always fire-and-forget. use Forget instead of await.");
|
||||
#endif
|
||||
}
|
||||
// [DebuggerHidden]
|
||||
// public void GetResult()
|
||||
// {
|
||||
//#if UNITY_2018_3_OR_NEWER
|
||||
// UnityEngine.Debug.LogWarning("UniTaskVoid can't await, always fire-and-forget. use Forget instead of await.");
|
||||
//#endif
|
||||
// }
|
||||
|
||||
[DebuggerHidden]
|
||||
public void OnCompleted(Action continuation)
|
||||
{
|
||||
}
|
||||
// [DebuggerHidden]
|
||||
// public void OnCompleted(Action continuation)
|
||||
// {
|
||||
// }
|
||||
|
||||
[DebuggerHidden]
|
||||
public void UnsafeOnCompleted(Action continuation)
|
||||
{
|
||||
}
|
||||
}
|
||||
// [DebuggerHidden]
|
||||
// public void UnsafeOnCompleted(Action continuation)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user