Hacker News new | ask | show | jobs
by sujayakar 585 days ago
+1. I'd be curious how much of a pessimization to uncontended workloads it'd be to just use `tokio::sync::RwLock`.

and, if we want to keep it as a spinlock, I'm curious how much the immediate wakeup compares to using `tokio::task::yield_now`: https://docs.rs/tokio/latest/tokio/task/fn.yield_now.html

1 comments

This is an interesting idea. I am gonna try this out - especially with dashmap, I think that could perform very well.
You could also look into shamelessly "taking inspiration" from async-lock.