Add WebAssembly support (#273)

This commit is contained in:
0xpablo authored and GitHub committed 2023-06-23 15:54:35 -07:00
1 parent 2ace7010e9
commit adb12bfccc
2 files changed
+6

No files matched your search

+2
View File
@@ -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>
@@ -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() {