Skip to content

Commit a9570cc

Browse files
committed
make this one not racey
1 parent c1105fc commit a9570cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tokio/tests/task_hooks.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,10 @@ fn run_override(mut builder: runtime::Builder) {
378378
}
379379

380380
impl TaskHookHarness for TestHooks {
381-
fn on_task_terminate(&mut self, _ctx: &mut OnTaskTerminateContext<'_>) {
381+
fn before_poll(&mut self, _ctx: &mut BeforeTaskPollContext<'_>) {
382382
self.counter.fetch_add(1, Ordering::SeqCst);
383383
}
384+
384385
fn on_child_spawn(
385386
&mut self,
386387
_ctx: &mut OnChildTaskSpawnContext<'_>,

0 commit comments

Comments
 (0)