Skip to content

Commit 3ac6a7b

Browse files
committed
Fix WASI Thread issue
1 parent 437bf77 commit 3ac6a7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/OpenSwiftUI/Core/Update/Update.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ enum Update {
8181

8282
@inline(__always)
8383
static func syncMain(_ body: () -> Void) {
84+
#if os(WASI)
85+
// FIXME: See #76
86+
block()
87+
#else
8488
if Thread.isMainThread {
8589
body()
8690
} else {
@@ -94,6 +98,7 @@ enum Update {
9498
}
9599
}
96100
}
101+
#endif
97102
}
98103
}
99104

0 commit comments

Comments
 (0)