fn grant_rustc_token_requests(&mut self) -> CargoResult<()> {
        while !self.to_send_clients.is_empty() && self.has_extra_tokens() {
            let (id, client) = self.pop_waiting_client();
            // This unwrap is guaranteed to succeed. `active` must be at least
            // length 1, as otherwise there can't be a client waiting to be sent
            // on, so tokens.len() must also be at least one.
            let token = self.tokens.pop().unwrap();
            self.rustc_tokens
                .entry(id)
                .or_insert_with(Vec::new)
                .push(token);
            client
                .release_raw()
                .with_context(|| "failed to release jobserver token")?;
        }

        Ok(())
    }
// If we managed to acquire some extra tokens, send them off to a waiting rustc.
If we managed to acquire some extra tokens, send them off to a waiting rustc.
If we managed to acquire some extra tokens send them off to a waiting rustc .
fn grant_rustc_token_requests(&mut self) -> CargoResult<()> {
        while !self.to_send_clients.is_empty() && self.has_extra_tokens() {
            let (id, client) = self.pop_waiting_client();
            // This unwrap is guaranteed to succeed. `active` must be at least
            // length 1, as otherwise there can't be a client waiting to be sent
            // on, so tokens.len() must also be at least one.
            let token = self.tokens.pop().unwrap();
            self.rustc_tokens
                .entry(id)
                .or_insert_with(Vec::new)
                .push(token);
            client
                .release_raw()
                .with_context(|| "failed to release jobserver token")?;
        }
        Ok(())
    }
fn grant_rustc_token_requests ( & mut self ) -> CargoResult < ( ) > { while ! self . to_send_clients . is_empty ( ) && self . has_extra_tokens ( ) { let ( id , client ) = self . pop_waiting_client ( ) ; // This unwrap is guaranteed to succeed. `active` must be at least // length 1, as otherwise there can't be a client waiting to be sent // on, so tokens.len() must also be at least one. let token = self . tokens . pop ( ) . unwrap ( ) ; self . rustc_tokens . entry ( id ) . or_insert_with ( Vec :: new ) . push ( token ) ; client . release_raw ( ) . with_context ( | | " " ) ? ; } Ok ( ( ) ) }
If we managed to acquire some extra tokens, send them off to a waiting rustc.
If we managed to acquire some extra tokens send them off to a waiting rustc .
&mut self
&mut self