uazu / qcell

Statically-checked alternatives to RefCell and RwLock
Apache License 2.0
356 stars 22 forks source link

A Refactor of qcell to make it more generic, extensible, and checkable #12

Closed RustyYato closed 4 years ago

RustyYato commented 4 years ago

see #11 for rationale

RustyYato commented 4 years ago

I have added ro, rw, rw2, and rw3 directly to the given owners and they just forward to the generic implementation on the trait. This is to preserve backwards compatibility. I will need to add in the other specialized functions to get complete back-compat, so don't merge just yet

RustyYato commented 4 years ago

TODO

Yay for long lists!

RustyYato commented 4 years ago

Most of the basic implementation work is done, I think I have addressed these concerns well enough. Is there anything that stands out to you @uazu?

RustyYato commented 4 years ago

Do you really need QCellOwnerID reclamation? I don't think there is ever a use case for creating 2^32 QCellOwners, and if you can think of one, we can just bump up to using u64 instead of u32. Then there won't be any use case of using 2^64 QCellOwners. (for scale, going and creating 1 million QCellOwners per second would take half a million years to exhaust u64)

If we ditch reclamation, we can support safe QCell on no_std

RustyYato commented 4 years ago

List of breaking changes:

RustyYato commented 4 years ago

Because we aren't going we this as per #11, close