@@ -188,12 +188,12 @@ where
188
188
#[ cfg( not( parallel_compiler) ) ]
189
189
let mut state_lock = state. active . lock ( ) ;
190
190
let lock = & mut * state_lock;
191
+ let current_job_id = qcx. current_query_job ( ) ;
191
192
192
193
match lock. entry ( key) {
193
194
Entry :: Vacant ( entry) => {
194
195
let id = qcx. next_job_id ( ) ;
195
- let job = qcx. current_query_job ( ) ;
196
- let job = QueryJob :: new ( id, span, job) ;
196
+ let job = QueryJob :: new ( id, span, current_job_id) ;
197
197
198
198
let key = * entry. key ( ) ;
199
199
entry. insert ( QueryResult :: Started ( job) ) ;
@@ -212,7 +212,7 @@ where
212
212
// so we just return the error.
213
213
return TryGetJob :: Cycle ( id. find_cycle_in_stack (
214
214
qcx. try_collect_active_jobs ( ) . unwrap ( ) ,
215
- & qcx . current_query_job ( ) ,
215
+ & current_job_id ,
216
216
span,
217
217
) ) ;
218
218
}
@@ -230,7 +230,7 @@ where
230
230
231
231
// With parallel queries we might just have to wait on some other
232
232
// thread.
233
- let result = latch. wait_on ( qcx . current_query_job ( ) , span) ;
233
+ let result = latch. wait_on ( current_job_id , span) ;
234
234
235
235
match result {
236
236
Ok ( ( ) ) => TryGetJob :: JobCompleted ( query_blocked_prof_timer) ,
0 commit comments