pub struct VxKernel { /* private fields */ }Expand description
The VX Kernel — manages token lifecycle and dispatches work
The kernel operates in a loop:
- Exhaust ready queue (no await — pure CPU work)
- Check completion (all done? deadlock?)
- Park and wait (single await point: select! on lanes)
Implementations§
Source§impl VxKernel
impl VxKernel
Sourcepub fn metrics(&self) -> &Arc<KernelMetrics>
pub fn metrics(&self) -> &Arc<KernelMetrics>
Get metrics reference
Sourcepub fn is_accepting(&self) -> bool
pub fn is_accepting(&self) -> bool
Check if kernel is accepting requests
Sourcepub fn enqueue(
&self,
request_id: u64,
service: String,
payload: Vec<u8>,
) -> bool
pub fn enqueue( &self, request_id: u64, service: String, payload: Vec<u8>, ) -> bool
Enqueue a new request token
Sourcepub fn dequeue_ready(&self) -> Option<u64>
pub fn dequeue_ready(&self) -> Option<u64>
Dequeue next ready token (non-blocking)
Sourcepub fn token_state(&self, request_id: u64) -> Option<TokenState>
pub fn token_state(&self, request_id: u64) -> Option<TokenState>
Get token state
Sourcepub fn ready_count(&self) -> usize
pub fn ready_count(&self) -> usize
Get ready queue length
Sourcepub fn handle_control(&self, signal: ControlSignal)
pub fn handle_control(&self, signal: ControlSignal)
Process a control signal
Auto Trait Implementations§
impl !Freeze for VxKernel
impl !RefUnwindSafe for VxKernel
impl Send for VxKernel
impl Sync for VxKernel
impl Unpin for VxKernel
impl UnsafeUnpin for VxKernel
impl UnwindSafe for VxKernel
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