mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 08:59:07 +01:00
Fix spin lock
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::time::Duration;
|
||||
use log::{debug, info};
|
||||
use tauri::{AppHandle, Manager, Runtime};
|
||||
use tokio::sync::watch::Sender;
|
||||
@@ -30,8 +31,10 @@ impl PluginManager {
|
||||
PluginManager { client, kill_tx }
|
||||
}
|
||||
|
||||
pub fn cleanup(&mut self) {
|
||||
pub async fn cleanup(&mut self) {
|
||||
self.kill_tx.send_replace(true);
|
||||
// Give it a sec to get the tx and kill
|
||||
tokio::time::sleep(Duration::from_millis(500)).await;
|
||||
}
|
||||
|
||||
pub async fn run_import(&mut self, data: &str) -> Result<HookResponse, String> {
|
||||
|
||||
Reference in New Issue
Block a user