Skip to content
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

Unify global recent / global clock usage. #41

Open
tobz opened this issue Mar 9, 2021 · 0 comments
Open

Unify global recent / global clock usage. #41

tobz opened this issue Mar 9, 2021 · 0 comments

Comments

@tobz
Copy link
Member

tobz commented Mar 9, 2021

During the work to expose more free functions on Instant and add mock ability, we created a small rift between Clock and Instant.

Primarily, we have three issues:

  • Instant::recent will fallback to the global clock, while Clock::recent won't
  • Instant::recent is an acquire load, while Clock::recent is a relaxed load
  • quanta::set_recent and Clock::upkeep aren't DRY (small problem, but still)

We should unify these codepaths so that we're limiting the chance for differences in behavior, as well as switching entirely to relaxed loads for "recent" time to ensure maximum performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant