Struct rustc_query_system::query::plumbing::JobOwner [−][src]
struct JobOwner<'tcx, D, K> where
D: Copy + Clone + Eq + Hash,
K: Eq + Hash + Clone, {
state: &'tcx QueryState<D, K>,
key: K,
id: QueryJobId<D>,
}
Expand description
A type representing the responsibility to execute the job in the job
field.
This will poison the relevant query if dropped.
Fields
state: &'tcx QueryState<D, K>
key: K
id: QueryJobId<D>
Implementations
fn try_start<'b, CTX>(
tcx: &'b CTX,
state: &'b QueryState<CTX::DepKind, K>,
span: Span,
key: K,
lookup: QueryLookup,
dep_kind: CTX::DepKind
) -> TryGetJob<'b, CTX::DepKind, K> where
CTX: QueryContext,
fn try_start<'b, CTX>(
tcx: &'b CTX,
state: &'b QueryState<CTX::DepKind, K>,
span: Span,
key: K,
lookup: QueryLookup,
dep_kind: CTX::DepKind
) -> TryGetJob<'b, CTX::DepKind, K> where
CTX: QueryContext,
Either gets a JobOwner
corresponding the query, allowing us to
start executing the query, or returns with the result of the query.
This function assumes that try_get_cached
is already called and returned lookup
.
If the query is executing elsewhere, this will wait for it and return the result.
If the query panicked, this will silently panic.
This function is inlined because that results in a noticeable speed-up for some compile-time benchmarks.
fn complete<C>(
self,
cache: &QueryCacheStore<C>,
result: C::Value,
dep_node_index: DepNodeIndex
) -> C::Stored where
C: QueryCache<Key = K>,
fn complete<C>(
self,
cache: &QueryCacheStore<C>,
result: C::Value,
dep_node_index: DepNodeIndex
) -> C::Stored where
C: QueryCache<Key = K>,
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
Trait Implementations
Auto Trait Implementations
impl<'tcx, D, K> !RefUnwindSafe for JobOwner<'tcx, D, K>
impl<'tcx, D, K> !UnwindSafe for JobOwner<'tcx, D, K>
Blanket Implementations
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.