You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
So i've been reading through the docs/notes and parking_lot sounds awesome. I'm using std RwLock a lot and I was surprised to learn a few months back that because pthread primitives are non TM that rust std lib has to box them. You mention in the notes that parking_lot RwLock is just one additional word of space. I just want to clarify, does this means a parking_lot RwLock doesn't not implicitly allocate?
The text was updated successfully, but these errors were encountered:
Correct. parking_lot only needs a single AtomicUsize as state next to the actual value. This AtomicUsize can be moved together with the rest of the RwLock and as such doesn't need to be boxed.
Hey,
So i've been reading through the docs/notes and parking_lot sounds awesome. I'm using std RwLock a lot and I was surprised to learn a few months back that because pthread primitives are non TM that rust std lib has to box them. You mention in the notes that parking_lot RwLock is just one additional word of space. I just want to clarify, does this means a parking_lot RwLock doesn't not implicitly allocate?
The text was updated successfully, but these errors were encountered: