System.Threading.ThreadPoolBoundHandle.Release C# (CSharp) Метод

Release() приватный Метод

private Release ( ) : void
Результат void
        private void Release()
        {
            _lifetime.Release(this);
        }

Usage Example

        private static unsafe void OnNativeIOCompleted(IntPtr instance, IntPtr context, IntPtr overlappedPtr, uint ioResult, UIntPtr numberOfBytesTransferred, IntPtr ioPtr)
        {
            Win32ThreadPoolNativeOverlapped *overlapped = (Win32ThreadPoolNativeOverlapped *)overlappedPtr;

            ThreadPoolBoundHandle boundHandle = overlapped->Data._boundHandle;

            if (boundHandle == null)
            {
                throw new InvalidOperationException(SR.Argument_NativeOverlappedAlreadyFree);
            }

            boundHandle.Release();

            Win32ThreadPoolNativeOverlapped.CompleteWithCallback(ioResult, (uint)numberOfBytesTransferred, overlapped);
        }