Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sources/AsyncAlgorithms/Locking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ internal struct Lock {
typealias Primitive = pthread_mutex_t
#elseif canImport(WinSDK)
typealias Primitive = SRWLOCK
#else
typealias Primitive = Int
#endif

typealias PlatformLock = UnsafeMutablePointer<Primitive>
Expand Down
4 changes: 4 additions & 0 deletions Sources/AsyncSequenceValidation/TaskDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ final class TaskDriver {
}

func start() {
#if canImport(Darwin) || canImport(Glibc)
pthread_create(&thread, nil, start_thread,
Unmanaged.passRetained(self).toOpaque())
#elseif canImport(WinSDK)
#error("TODO: Port TaskDriver threading to windows")
#endif
}

func run() {
Expand Down