pub struct QueueOwner { /* private fields */ }Expand description
The queue owner process — owns the ACP bridge and multiplexes incoming prompts from IPC clients, executing them sequentially.
Implementations§
Source§impl QueueOwner
impl QueueOwner
Sourcepub async fn new(
bridge: AcpBridge,
listener: UnixListener,
session_key: &str,
ttl_secs: u64,
) -> Result<Self>
pub async fn new( bridge: AcpBridge, listener: UnixListener, session_key: &str, ttl_secs: u64, ) -> Result<Self>
Create a new queue owner.
The caller must have already written the lease file and started the IPC
server (UnixListener).
Sourcepub async fn run(self) -> Result<()>
pub async fn run(self) -> Result<()>
Run the owner event loop.
Uses tokio::select! to concurrently handle:
- New client connections from the Unix socket.
- Bridge events (forwarded to the active prompt’s client).
- Heartbeat timer (updates lease file every 5 seconds).
- Idle timeout (shuts down after
ttl_secswith an empty queue).
Auto Trait Implementations§
impl !Freeze for QueueOwner
impl RefUnwindSafe for QueueOwner
impl Send for QueueOwner
impl Sync for QueueOwner
impl Unpin for QueueOwner
impl UnsafeUnpin for QueueOwner
impl UnwindSafe for QueueOwner
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