vorner / arc-swap

Support atomic operations on Arc itself

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ideas for cleanups & API simplification

vorner opened this issue · comments

  • The Lease and similar „transient“ objects could deref to Arc (or the held pointer) instead of T directly.
    • This would solve the problem with Option valued things.
    • This would also allow Arc::clone without the need for our own upgrade method.
  • There are entirely too many load-style methods. Can we pick fewer of them and get rid of the rest?
  • Is the name load confusing? Eg. let db = in_memory_db.load() hints at loading the whole database somewhere from disk, not at just getting a pointer to it.

Decided to leave load as it is (or, actually, migrate everything to loads).