/// <summary> /// 调用返回值(警告:每次调用只能使用一次) /// </summary> /// <param name="value"></param> public void Get(out fastCSharp.net.returnValue value) { waitHandle.Wait(); value.Type = outputParameter; outputParameter = returnValue.type.Unknown; typePool <waitCall> .PushNotNull(this); }
public subArray <byte> ReadHeader() { if (isDisposed == 0) { waitHandle.Wait(); } return(data); }
/// <summary> /// 等待缓存区 /// </summary> private void waitBuffer() { if (data.array != null) { Thread.Sleep(0); interlocked.CompareSetYield(ref bufferLock); if (data.array == null) { bufferLock = 0; } else { isWaitBuffer = 1; bufferLock = 0; clientHandle.Wait(); } } }