Expand description
Ids handed out under a lock, to tell one thing apart from another that replaced it.
Two shapes use this, and the difference lives in the caller, not in the id:
- a generation, compared against
IdGenerator::latestto tell whether something built with the lock released is still the current one — seeSharedDisposalandSwitch; - a key, identifying an entry of a collection — see
MergeAllandPublishSubject.
An Id can only come from an IdGenerator, which never hands the same one out twice, so a
holder of an id cannot forge one that collides with a later value.
Structs§
- Id
- An id handed out by an
IdGenerator. - IdGenerator
- Hands out an
Idthat is never equal to any it handed out before.