diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs index 234782b022c5b..6a338378ed483 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs @@ -104,6 +104,14 @@ private static unsafe int ReadSyncUsingAsyncHandle(SafeFileHandle handle, Span fileHandle.IsNoBuffering && fileHandle.CanSeek && fileOffset >= fileHandle.GetFileLength(); - // We need to store the reference count (see the comment in FreeNativeOverlappedIfItIsSafe) and an EventHandle to signal the completion. + // We need to store the reference count (see the comment in ReleaseRefCount) and an EventHandle to signal the completion. // We could keep these two things separate, but since ManualResetEvent is sealed and we want to avoid any extra allocations, this type has been created. // It's basically ManualResetEvent with reference count. private sealed class CallbackResetEvent : EventWaitHandle @@ -780,7 +796,7 @@ internal CallbackResetEvent(ThreadPoolBoundHandle threadPoolBoundHandle) : base( _threadPoolBoundHandle = threadPoolBoundHandle; } - internal unsafe void FreeNativeOverlapped(NativeOverlapped* pOverlapped) + internal unsafe void ReleaseRefCount(NativeOverlapped* pOverlapped) { // Each SafeFileHandle opened for async IO is bound to ThreadPool. // It requires us to provide a callback even if we want to use EventHandle and use GetOverlappedResult to obtain the result.