/// Completes the query by updating the query cache with the `result`,
/// signals the waiter and forgets the JobOwner, so it won't poison the query
Completes the query by updating the query cache with the `result`,
signals the waiter and forgets the JobOwner, so it won't poison the query
Completes the query by updating the query cache with the ` result ` signals the waiter and forgets the JobOwner so it won ' t poison the query
pub(super) fn complete(self, result: &Q::Value, dep_node_index: DepNodeIndex) {
        // We can move out of `self` here because we `mem::forget` it below
        let key = unsafe { ptr::read(&self.key) };
        let job = unsafe { ptr::read(&self.job) };
        let cache = self.cache;
        // Forget ourself so our destructor won't poison the query
        mem::forget(self);
        let value = QueryValue::new(result.clone(), dep_node_index);
        {
            let mut lock = cache.borrow_mut();
            lock.active.remove(&key);
            lock.results.insert(key, value);
        }
        job.signal_complete();
    }
pub ( super ) fn complete ( self , result : & Q :: Value , dep_node_index : DepNodeIndex ) { // We can move out of `self` here because we `mem::forget` it below let key = unsafe { ptr :: read ( & self . key ) } ; let job = unsafe { ptr :: read ( & self . job ) } ; let cache = self . cache ; // Forget ourself so our destructor won't poison the query mem :: forget ( self ) ; let value = QueryValue :: new ( result . clone ( ) , dep_node_index ) ; { let mut lock = cache . borrow_mut ( ) ; lock . active . remove ( & key ) ; lock . results . insert ( key , value ) ; } job . signal_complete ( ) ; }
Completes the query by updating the query cache with the `result`,
signals the waiter and forgets the JobOwner, so it won't poison the query
Completes the query by updating the query cache with the ` result ` signals the waiter and forgets the JobOwner so it won ' t poison the query
self
result
&Q::Value
dep_node_index
DepNodeIndex