void QueueIOSelectorJob (Queue<KeyValuePair<IntPtr, IOSelectorJob>> queue, IntPtr handle, IOSelectorJob job) { int count; lock (queue) { queue.Enqueue (new KeyValuePair<IntPtr, IOSelectorJob> (handle, job)); count = queue.Count; } if (count == 1) IOSelector.Add (handle, job); }
// Methods public static void Add(IntPtr handle, IOSelectorJob job) { } // 0x000000018075BDC0-0x000000018075BDD0
public static extern void Add(IntPtr handle, IOSelectorJob job);
void QueueIOSelectorJob (SemaphoreSlim sem, IntPtr handle, IOSelectorJob job) { sem.WaitAsync ().ContinueWith (t => { if (CleanedUp) { job.MarkDisposed (); return; } IOSelector.Add (handle, job); }); }
public static extern void Add (IntPtr handle, IOSelectorJob job);