STPEventWaitHandle.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Threading;
  3. namespace Amib.Threading.Internal
  4. {
  5. internal static class STPEventWaitHandle
  6. {
  7. public const int WaitTimeout = Timeout.Infinite;
  8. [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
  9. internal static bool WaitAll(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
  10. {
  11. return WaitHandle.WaitAll(waitHandles, millisecondsTimeout, exitContext);
  12. }
  13. [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
  14. internal static int WaitAny(WaitHandle[] waitHandles)
  15. {
  16. return WaitHandle.WaitAny(waitHandles);
  17. }
  18. [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
  19. internal static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext)
  20. {
  21. return WaitHandle.WaitAny(waitHandles, millisecondsTimeout, exitContext);
  22. }
  23. [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
  24. internal static bool WaitOne(WaitHandle waitHandle, int millisecondsTimeout, bool exitContext)
  25. {
  26. return waitHandle.WaitOne(millisecondsTimeout, exitContext);
  27. }
  28. }
  29. }