mirror of
https://github.com/openai/codex.git
synced 2026-04-28 16:45:54 +00:00
codex: clarify detached pending scheduler task
This commit is contained in:
@@ -535,14 +535,14 @@ impl Session {
|
|||||||
});
|
});
|
||||||
self.send_event(turn_context.as_ref(), event).await;
|
self.send_event(turn_context.as_ref(), event).await;
|
||||||
let session = Arc::clone(self);
|
let session = Arc::clone(self);
|
||||||
let _scheduler = tokio::task::spawn_blocking(move || {
|
drop(tokio::task::spawn_blocking(move || {
|
||||||
tokio::runtime::Handle::current().block_on(async move {
|
tokio::runtime::Handle::current().block_on(async move {
|
||||||
session.maybe_start_pending_timer().await;
|
session.maybe_start_pending_timer().await;
|
||||||
if should_clear_active_turn {
|
if should_clear_active_turn {
|
||||||
session.maybe_start_turn_for_pending_work().await;
|
session.maybe_start_turn_for_pending_work().await;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn take_active_turn(&self) -> Option<ActiveTurn> {
|
async fn take_active_turn(&self) -> Option<ActiveTurn> {
|
||||||
|
|||||||
Reference in New Issue
Block a user