internal void Queue(IEventInvocation eventInvocation) { try { spinLock.Lock(); waitingEvents.Enqueue(eventInvocation); } finally { spinLock.Unlock(); } }
public void Recycle() { Data = default(Data); try { spinLock.Lock(); pool.Enqueue(this); } finally { spinLock.Unlock(); } }
private static void SpinLockFunc() { for (int i = 0; i < 100000; i++) { spinLocker.Lock(); SpinLockCount++; spinLocker.Unlock(); } }
public static byte *ReadLine(byte *output, int length) { mutex.Lock(); max = length; position = 0; input = output; while (max != -1) { } max = -1; position = 0; input = null; mutex.Unlock(); return(null); }