hawkw / sharded-slab

a lock-free concurrent slab (experimental)
MIT License
273 stars 19 forks source link

feat(Crate): Add support for guards with arbitrary lifetimes #40

Closed bIgBV closed 4 years ago

bIgBV commented 4 years ago

This commit adds types for supporting guards with arbitrary lifetimes. The new OwnedGuard inner guard type holds NonNull pointers to the item and lifecycle. This is safe as the API is only available when Slab/Pool is wrapped in an Arc

bIgBV commented 4 years ago

Got some base types and methods in. Need to implement drop behavior.