pub fn sync_pending(&mut self) {
        let mut pending = self.pending.lock();
        // missing epochs
        while pending.epoch.len() < self.inner.data.len() {
            pending.epoch.push(0);
        }
        // pending reference adds
        for index in pending.add_ref.drain(..) {
            self.inner.meta[index] += 1;
        }
        // pending reference subs
        {
            let (refs, epoch) = pending.drain_sub();
            for index in refs {
                self.inner.meta[index] -= 1;
                if self.inner.meta[index] == 0 {
                    epoch[index] += 1;
                    let data = PointerData::new(index, epoch[index], self.id);
                    self.inner.free_list.push(data);
                }
            }
        }
    }
/// Synchronize for all the pending updates.
/// It will update all reference counters in Storage, so
/// [`iter_alive`](struct.Storage.html#method.iter_alive) and
/// [`iter_alive_mut`](struct.Storage.html#method.iter_alive_mut) will return actual information.
///
/// Use this function only if necessary, because it needs to block Storage.
Synchronize for all the pending updates.

Use this function only if necessary, because it needs to block Storage.
Synchronize for all the pending updates . Use this function only if necessary because it needs to block Storage .
pub fn sync_pending(&mut self) {
        let mut pending = self.pending.lock();
        // missing epochs
        while pending.epoch.len() < self.inner.data.len() {
            pending.epoch.push(0);
        }
        // pending reference adds
        for index in pending.add_ref.drain(..) {
            self.inner.meta[index] += 1;
        }
        // pending reference subs
        {
            let (refs, epoch) = pending.drain_sub();
            for index in refs {
                self.inner.meta[index] -= 1;
                if self.inner.meta[index] == 0 {
                    epoch[index] += 1;
                    let data = PointerData::new(index, epoch[index], self.id);
                    self.inner.free_list.push(data);
                }
            }
        }
    }
pub fn sync_pending ( & mut self ) { let mut pending = self . pending . lock ( ) ; // missing epochs while pending . epoch . len ( ) < self . inner . data . len ( ) { pending . epoch . push ( 0 ) ; } // pending reference adds for index in pending . add_ref . drain ( .. ) { self . inner . meta [ index ] += 1 ; } // pending reference subs { let ( refs , epoch ) = pending . drain_sub ( ) ; for index in refs { self . inner . meta [ index ] -= 1 ; if self . inner . meta [ index ] == 0 { epoch [ index ] += 1 ; let data = PointerData :: new ( index , epoch [ index ] , self . id ) ; self . inner . free_list . push ( data ) ; } } } }
Synchronize for all the pending updates.
Synchronize for all the pending updates .
&mut self