-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-threadArea: `std::thread`Area: `std::thread`C-bugCategory: This is a bug.Category: This is a bug.O-ESP-IDFTarget: Espressif IoT Development FrameworkTarget: Espressif IoT Development FrameworkO-hermitOperating System: HermitOperating System: HermitT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Multiple targets currently use Duration::as_micros
to implement conversion from a Duration to a value in microseconds. However, thread::sleep
currently reads as so:
Platforms which do not support nanosecond precision for sleeping will have
dur
rounded up to the nearest granularity of time they can sleep for.
Up. Note this Playground which means Duration::as_micros
is not a valid implementation of this spec.
Note that this is not the only problem that espidf poses with respect to its std implementation: #129136
Meta
rustc --version --verbose
:
rustc 1.82.0-nightly (2c93fabd9 2024-08-15)
binary: rustc
commit-hash: 2c93fabd98d2c183bcb3afed1f7d51b2517ac5ed
commit-date: 2024-08-15
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0
Metadata
Metadata
Assignees
Labels
A-threadArea: `std::thread`Area: `std::thread`C-bugCategory: This is a bug.Category: This is a bug.O-ESP-IDFTarget: Espressif IoT Development FrameworkTarget: Espressif IoT Development FrameworkO-hermitOperating System: HermitOperating System: HermitT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.