Skip to content

Support timeouts with monotonic clocks even when isolation is enabled #2631

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 29, 2022

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 28, 2022

With the deterministic monotonic clock support we now have, we can allow some synchronization primitives with timeouts even under isolation:

  • Linux futex waiting (when set to the monotonic clock)
  • pthread_cond_timedwait (when set to the monotonic clock)
  • Windows WaitOnAddress

Unfortunately none of these exist on macOS -- the standard library always uses the system clock for timeouts on macOS, so that will still require -Zmiri-disable-isolation.

@RalfJung RalfJung changed the title Support waiting on monotonic clocks even when isolation is enabled Support timeouts with monotonic clocks even when isolation is enabled Oct 28, 2022
@RalfJung RalfJung force-pushed the futex-wait-no-isolate branch from fdc221b to 053d132 Compare October 28, 2022 15:02
@RalfJung RalfJung force-pushed the futex-wait-no-isolate branch from 053d132 to e87de43 Compare October 28, 2022 20:54
@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Oct 29, 2022

📌 Commit e87de43 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 29, 2022

⌛ Testing commit e87de43 with merge 6bbf016...

@bors
Copy link
Contributor

bors commented Oct 29, 2022

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 6bbf016 to master...

@bors bors merged commit 6bbf016 into rust-lang:master Oct 29, 2022
@RalfJung RalfJung deleted the futex-wait-no-isolate branch October 29, 2022 14:03
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 30, 2022
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Nov 5, 2022
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants