-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
multiple platforms incorrectly impl thread::sleep with Duration::as_micros #129212
Copy link
Copy link
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
Activity
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.
Multiple targets currently use
Duration::as_microsto implement conversion from a Duration to a value in microseconds. However,thread::sleepcurrently reads as so:Up. Note this Playground which means
Duration::as_microsis 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: