Concurrency tweak for single-thread wasm

This commit is contained in:
Guillaume Lessard committed 2026-07-29 19:41:17 -07:00
1 parent b9e0ecaa60
commit 29b14a3025
1 file changed
+3 -2
+3 -2
View File
@@ -185,8 +185,9 @@ extension String {
#if os(Windows)
internal typealias _PlatformTLSKey = DWORD
#elseif os(WASI) && (swift(<6.1) || !_runtime(_multithreaded))
// Mock TLS storage for single-threaded WASI
internal final class _PlatformTLSKey {
// Mock TLS storage for single-threaded WASI.
// Carries no state of its own, and only used to index `sharedTLSStorage`.
internal final class _PlatformTLSKey: @unchecked Sendable {
fileprivate init() {}
}
private final class TLSStorage: @unchecked Sendable {