Skip to content

[wasm][stdlib] Don't use <thread> sleep API with swift-threading-package=none #69006

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

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Oct 6, 2023

Unfortunately sleep_until is defined under header even though it does not use thread feature at all with std::chrono::steady_clock. The header in libcxx is not available when thread feature is disabled, so we need to fallback to nanosleep for the case.

Resolves part of rdar://116552886

…age=none

Unfortunately `sleep_until` is defined under <thread> header even though
it does not use thread feature at all with `std::chrono::steady_clock`.
The <thread> header in libcxx is not available when thread feature is
disabled, so we need to fallback to nanosleep for the case.
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@kateinoigakukun kateinoigakukun marked this pull request as ready for review October 6, 2023 04:28
@MaxDesiatov MaxDesiatov added standard library Area: Standard library umbrella WebAssembly Platform: WebAssembly labels Oct 6, 2023
@kateinoigakukun kateinoigakukun merged commit 8ae6ec7 into swiftlang:main Oct 6, 2023
@kateinoigakukun kateinoigakukun deleted the pr-0983246048e8181baa144ac66ad3344b4b1b774c branch October 6, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standard library Area: Standard library umbrella WebAssembly Platform: WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants