fn add_lock(&mut self, semaphore: String, count: i64, acquired: bool) {
        if acquired {
            let prev = self.acquired.insert(semaphore, count);
            debug_assert!(prev.is_none());
        } else {
            let since = Instant::now();
            debug_assert!(self.pending.is_none());
            self.pending = Some(Lock {
                semaphore,
                count,
                since,
            });
        }
    }
/// Adds a lock for the semaphore to the peer
Adds a lock for the semaphore to the peer
Adds a lock for the semaphore to the peer
fn add_lock(&mut self, semaphore: String, count: i64, acquired: bool) {
        if acquired {
            let prev = self.acquired.insert(semaphore, count);
            debug_assert!(prev.is_none());
        } else {
            let since = Instant::now();
            debug_assert!(self.pending.is_none());
            self.pending = Some(Lock {
                semaphore,
                count,
                since,
            });
        }
    }
fn add_lock ( & mut self , semaphore : String , count : i64 , acquired : bool ) { if acquired { let prev = self . acquired . insert ( semaphore , count ) ; debug_assert ! ( prev is_none ( ) ) ; } else { let since = Instant :: now ( ) ; debug_assert ! ( self pending is_none ( ) ) ; self . pending = Some ( Lock { semaphore , count , since , } ) ; } }
Adds a lock for the semaphore to the peer
Adds a lock for the semaphore to the peer
&mut self
semaphore
String
count
i64
acquired
bool
&mut self
semaphore
String
count
i64
acquired
bool