Files
LowPolyRPG/Assets/Plugins/Nullframes/Intrigues/Scripts/Runtime/Tasks/TaskCompletionSource.cs
Caleb Sandford deQuincey 715fb68744 Initial commitment
2025-06-25 11:10:11 +01:00

15 lines
453 B
C#

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);
}
}