#nullable enable
using System;
using System.Threading.Tasks;
using Barotrauma;
namespace EosInterfacePrivate;
///
/// Creates a task that returns the result of a callback.
/// This is meant to be used with EOS' asynchronous methods,
/// which are all callback-based because this is a C library.
///
internal class CallbackWaiter where T : notnull
{
private readonly object mutex = new object();
private Option result = Option.None;
private readonly DateTime timeout;
public readonly Task