1
0

STPEventWaitHandle.cs 1.2 KB

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