pub struct TaskQueue { /* private fields */ }Implementations§
Source§impl TaskQueue
impl TaskQueue
pub fn new() -> Self
Sourcepub async fn submit(&self, prompt: &str, cwd: &str) -> String
pub async fn submit(&self, prompt: &str, cwd: &str) -> String
Submit a task to run in the background. Returns task ID.
Sourcepub async fn result(&self, task_id: &str) -> Option<AgentResult>
pub async fn result(&self, task_id: &str) -> Option<AgentResult>
Get result of a completed task.
Sourcepub async fn active_count(&self) -> usize
pub async fn active_count(&self) -> usize
Count of pending + running tasks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskQueue
impl !RefUnwindSafe for TaskQueue
impl Send for TaskQueue
impl Sync for TaskQueue
impl Unpin for TaskQueue
impl UnsafeUnpin for TaskQueue
impl !UnwindSafe for TaskQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more