2013-05-01 22:00:46 +00:00
|
|
|
#if !(_WINDOWS_CE)
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
namespace Amib.Threading.Internal
|
|
|
|
{
|
|
|
|
#if _WINDOWS || WINDOWS_PHONE
|
|
|
|
internal static class STPEventWaitHandle
|
|
|
|
{
|
|
|
|
public const int WaitTimeout = Timeout.Infinite;
|
|
|
|
|
|
|
|
internal static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAll(waitHandles, millisecondsTimeout);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static int WaitAny(WaitHandle[] waitHandles)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAny(waitHandles);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAny(waitHandles, millisecondsTimeout);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return waitHandle.WaitOne(millisecondsTimeout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
internal static class STPEventWaitHandle
|
|
|
|
{
|
|
|
|
public const int WaitTimeout = Timeout.Infinite;
|
|
|
|
|
|
|
|
internal static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAll(waitHandles, millisecondsTimeout, exitContext);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static int WaitAny(WaitHandle[] waitHandles)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAny(waitHandles);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return WaitHandle.WaitAny(waitHandles, millisecondsTimeout, exitContext);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext)
|
|
|
|
{
|
|
|
|
return waitHandle.WaitOne(millisecondsTimeout, exitContext);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-05-01 18:01:43 +00:00
|
|
|
#endif
|