From 29b14a3025eda35e406424938b6696b5299cfc09 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Wed, 29 Jul 2026 09:50:57 -0700 Subject: [PATCH] Concurrency tweak for single-thread wasm --- Sources/System/Internals/Exports.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/System/Internals/Exports.swift b/Sources/System/Internals/Exports.swift index f853b0f..088a325 100644 --- a/Sources/System/Internals/Exports.swift +++ b/Sources/System/Internals/Exports.swift @@ -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 {