pub struct ProcessPool { /* private fields */ }Expand description
Manages a pool of isolated LitProcess instances
Implementations§
Source§impl ProcessPool
impl ProcessPool
pub fn new(binary_path: PathBuf, model: String, pool_size: usize) -> Self
pub async fn initialize(&mut self) -> Result<()>
pub async fn get_process(&self) -> Result<Arc<LitProcess>>
pub async fn send_prompt(&self, prompt: &str) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcessPool
impl RefUnwindSafe for ProcessPool
impl Send for ProcessPool
impl Sync for ProcessPool
impl Unpin for ProcessPool
impl UnsafeUnpin for ProcessPool
impl UnwindSafe for ProcessPool
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