mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-11 18:28:50 +02:00
44 lines
1 KiB
C#
44 lines
1 KiB
C#
|
using Ryujinx.Horizon.Sdk.OsTypes.Impl;
|
|||
|
|
|||
|
namespace Ryujinx.Horizon.Sdk.OsTypes
|
|||
|
{
|
|||
|
class MultiWait
|
|||
|
{
|
|||
|
private readonly MultiWaitImpl _impl;
|
|||
|
|
|||
|
public MultiWait()
|
|||
|
{
|
|||
|
_impl = new MultiWaitImpl();
|
|||
|
}
|
|||
|
|
|||
|
public void LinkMultiWaitHolder(MultiWaitHolderBase multiWaitHolder)
|
|||
|
{
|
|||
|
DebugUtil.Assert(!multiWaitHolder.IsLinked);
|
|||
|
|
|||
|
_impl.LinkMultiWaitHolder(multiWaitHolder);
|
|||
|
|
|||
|
multiWaitHolder.SetMultiWait(_impl);
|
|||
|
}
|
|||
|
|
|||
|
public void MoveAllFrom(MultiWait other)
|
|||
|
{
|
|||
|
_impl.MoveAllFrom(other._impl);
|
|||
|
}
|
|||
|
|
|||
|
public MultiWaitHolder WaitAny()
|
|||
|
{
|
|||
|
return (MultiWaitHolder)_impl.WaitAnyImpl(true, -1L);
|
|||
|
}
|
|||
|
|
|||
|
public MultiWaitHolder TryWaitAny()
|
|||
|
{
|
|||
|
return (MultiWaitHolder)_impl.WaitAnyImpl(false, 0);
|
|||
|
}
|
|||
|
|
|||
|
public MultiWaitHolder TimedWaitAny(long timeout)
|
|||
|
{
|
|||
|
return (MultiWaitHolder)_impl.WaitAnyImpl(false, timeout);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|