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

Implement atomic-await #306

Open
krtab opened this issue Mar 13, 2023 · 0 comments
Open

Implement atomic-await #306

krtab opened this issue Mar 13, 2023 · 0 comments

Comments

@krtab
Copy link

krtab commented Mar 13, 2023

Hi!

Thanks a lot for this very impressive crate.

I'm trying to use it on rendezvous but I can't because I'm depending on @m-ou-se atomic-wait.

I've tried using mock implementations like:

#[cfg(loom)]
mod atomic_wait {
    pub use loom::sync::atomic::AtomicU32;
    pub fn wake_all(_atomic: *const AtomicU32) {
        loom::thread::yield_now();
    }
    pub fn wait(_atomic: &AtomicU32, _value: u32) {
        loom::thread::yield_now();
    }

}

but this unfortunately leads to "Model exceeded maximum number of branches. This is often caused by an algorithm requiring the processor to make progress, e.g. spin locks." in some cases that would be relevant to the tests.

If feasible, I think that having atomic-wait supported by loom would be great!

Thanks

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