Fixed compile errors on windows (#2278)

Compile error seems to be caused by https://github.com/apple/swift-nio/pull/2266/
This commit is contained in:
toluRV authored and GitHub committed 2022-10-05 01:55:40 -07:00
1 parent 5aa44987f8
commit dee448ac8b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ public struct NIOLock {
internal func unlock() {
#if os(Windows)
ReleaseSRWLockExclusive(self._storage.mutex)
ReleaseSRWLockExclusive(self.mutex)
#else
let err = pthread_mutex_unlock(self.mutex)
precondition(err == 0, "\(#function) failed in pthread_mutex with error \(err)")
+1 -1
View File
@@ -221,7 +221,7 @@ public final class ConditionLock<T: Equatable> {
}
let dwWaitStart = timeGetTime()
if !SleepConditionVariableSRW(self.cond, self.mutex.mutex,
if !SleepConditionVariableSRW(self.cond, self.mutex._storage.mutex,
dwMilliseconds, 0) {
let dwError = GetLastError()
if (dwError == ERROR_TIMEOUT) {