mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 10:08:29 +02:00
Bump plugin manager channel sizes to account for more plugins
This commit is contained in:
@@ -57,7 +57,7 @@ pub struct PluginManager {
|
|||||||
|
|
||||||
impl PluginManager {
|
impl PluginManager {
|
||||||
pub fn new<R: Runtime>(app_handle: AppHandle<R>) -> PluginManager {
|
pub fn new<R: Runtime>(app_handle: AppHandle<R>) -> PluginManager {
|
||||||
let (events_tx, mut events_rx) = mpsc::channel(128);
|
let (events_tx, mut events_rx) = mpsc::channel(2048);
|
||||||
let (kill_server_tx, kill_server_rx) = tokio::sync::watch::channel(false);
|
let (kill_server_tx, kill_server_rx) = tokio::sync::watch::channel(false);
|
||||||
|
|
||||||
let (client_disconnect_tx, mut client_disconnect_rx) = mpsc::channel(128);
|
let (client_disconnect_tx, mut client_disconnect_rx) = mpsc::channel(128);
|
||||||
@@ -320,7 +320,7 @@ impl PluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn subscribe(&self, label: &str) -> (String, mpsc::Receiver<InternalEvent>) {
|
pub async fn subscribe(&self, label: &str) -> (String, mpsc::Receiver<InternalEvent>) {
|
||||||
let (tx, rx) = mpsc::channel(128);
|
let (tx, rx) = mpsc::channel(2048);
|
||||||
let rx_id = format!("{label}_{}", generate_id());
|
let rx_id = format!("{label}_{}", generate_id());
|
||||||
self.subscribers.lock().await.insert(rx_id.clone(), tx);
|
self.subscribers.lock().await.insert(rx_id.clone(), tx);
|
||||||
(rx_id, rx)
|
(rx_id, rx)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ impl PluginRuntimeServerWebsocket {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn accept_connection(&self, stream: TcpStream) {
|
async fn accept_connection(&self, stream: TcpStream) {
|
||||||
let (to_plugin_tx, mut to_plugin_rx) = mpsc::channel::<InternalEvent>(128);
|
let (to_plugin_tx, mut to_plugin_rx) = mpsc::channel::<InternalEvent>(2048);
|
||||||
let mut app_to_plugin_events_tx = self.app_to_plugin_events_tx.lock().await;
|
let mut app_to_plugin_events_tx = self.app_to_plugin_events_tx.lock().await;
|
||||||
*app_to_plugin_events_tx = Some(to_plugin_tx);
|
*app_to_plugin_events_tx = Some(to_plugin_tx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user