Recall that crossbeam_epoch::pin calls Handle::pin, which in turn calls pin on its Local. What happens during the execution of Local::pin? A lot:
pub fn pin(&self) -> Guard { let guard = Guard { local: self }; let guard_count = self.guard_count.get(); self.guard_count.set(guard_count.checked_add(1).unwrap());
The Local guard count is increased, which is done amusingly by creating a Guard with self. If the guard count was previously zero:
if guard_count == 0 { let global_epoch = self.global().epoch.load(Ordering::Relaxed); let new_epoch = global_epoch.pinned();
This means that there are no other active participants in Local, and Local needs to query for the global epoch. The global epoch is loaded as the Local ...