Files
LowPolyRPG/Assets/Plugins/Nullframes/Intrigues/Scripts/Runtime/Tasks/TaskCompletionSource.cs

15 lines
453 B
C#
Raw Normal View History

2025-06-25 11:10:11 +01:00
using System;
using System.Threading.Tasks;
namespace Nullframes.Threading.Tasks
{
/// <summary>
/// Non generic wrapper for a <see cref="TaskCompletionSource{T}"/> that represents a Task that returns no value.
/// </summary>
internal sealed class TaskCompletionSource : TaskCompletionSource<Exception>
{
public void SetCompleted() => SetResult(null);
public bool TrySetCompleted() => TrySetResult(null);
}
}