Ejemplo n.º 1
0
        public static unsafe int WaitAny(SyncHandle *handles,
                                         int handleCount,
                                         TimeSpan timeout)
        {
            WaitHandle[] waits = Thread.CurrentThread.GetSyncHandles(handleCount);
            for (int i = 0; i < handleCount; i++)
            {
                waits[i] = HandleTable.GetHandle(handles[i].id) as WaitHandle;;
            }

            int ret = WaitHandle.WaitAny(waits, handleCount,
                                         SchedulerTime.Now + timeout);

            Tracing.Log(Tracing.Debug,
                        "SyncHandle.WaitAny(handles={0:x8}, count={1}, time=) = {2}",
                        (UIntPtr)handles,
                        (UIntPtr) unchecked ((uint)handleCount),
                        (UIntPtr) unchecked ((uint)ret));

            for (int i = 0; i < handleCount; i++)
            {
                waits[i] = null;
            }
            return(ret);
        }
Ejemplo n.º 2
0
 public static extern unsafe int WaitAny(SyncHandle *handles,
                                         int handleCount,
                                         TimeSpan timeout);
Ejemplo n.º 3
0
 public static extern unsafe int WaitAny(SyncHandle *handles,
                                         int handleCount,
                                         SchedulerTime stop);
Ejemplo n.º 4
0
 public static extern unsafe int WaitAny(SyncHandle *handles,
                                         int handleCount);