top | item 42055098

(no title)

sujayakar | 1 year 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

discuss

order

willothy|1 year ago

This is an interesting idea. I am gonna try this out - especially with dashmap, I think that could perform very well.

zamalek|1 year ago

You could also look into shamelessly "taking inspiration" from async-lock.