dspk-app-core 0.0.6

DSP App core: the workbench for any multichannel signal (open, view, process, write) and the plugin interface the domain plugins (electrophysiology: dspk-app-synapse) extend
Documentation
//! The background services every view shares, as a GPUI global: one work pool (renders) and
//! the hover reader.

use gpui_kit::{App, Global};

use crate::screens::explore::trace::hover::HoverReader;
use crate::data::work_pool::WorkPool;

/// Work-pool slot of a view's frame renders.
pub const RENDER_SLOT: u32 = 0;

pub struct Services {
    pub pool: WorkPool,
    pub hover: HoverReader,
}

impl Global for Services {}

impl Services {
    pub fn install(cx: &mut App) {
        cx.set_global(Services { pool: WorkPool::new(WorkPool::default_threads()), hover: HoverReader::spawn() });
    }
}