-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[WebAssembly] Add SWIFT_ONCE_F implementation to Lazy.h #31674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0dff35d
to
8e28d42
Compare
My immediate concern is that we have documentation about how this implementation suffices but should be immediately replaced with one grounded in atomics when the WASM folk get around to merging support for concurrency. Could you open an SR and leave behind a FIXME referencing that? |
@CodaFi there's already a reference to the corresponding SR-12097 at the header of the file in |
I’d like a separate issue about this function specifically. The SR is OK as an umbrella, but there’s no signal in there about what is and isn’t done. |
8e28d42
to
b1f1838
Compare
Makes sense, that's done now. |
@swift-ci smoke test |
include/swift/Basic/Lazy.h
Outdated
@@ -24,6 +24,24 @@ | |||
#include "swift/Basic/Malloc.h" | |||
#include "swift/Basic/type_traits.h" | |||
|
|||
#ifdef __wasi__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind using #if define(__wasi__)
please?
b1f1838
to
ec264a8
Compare
@swift-ci please test |
Build failed |
Build failed |
SWIFT_ONCE_F
has to be implemented separately for WebAssembly/WASI as WebAssembly currently doesn't support threads.Related to SR-9307.
(cc @compnerd @kateinoigakukun)