refactor: replace tokio::task::spawn_blocking with AsyncHandler::spawn_blocking for improved task management
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#[cfg(target_os = "windows")]
|
||||
use crate::process::AsyncHandler;
|
||||
use crate::{logging, utils::logging::Type};
|
||||
use anyhow::{bail, Context, Result};
|
||||
use hmac::{Hmac, Mac};
|
||||
@@ -143,7 +145,7 @@ pub async fn send_ipc_request(
|
||||
|
||||
let request_json = serde_json::to_string(&request)?;
|
||||
|
||||
let result = tokio::task::spawn_blocking(move || -> Result<IpcResponse> {
|
||||
let result = AsyncHandler::spawn_blocking(move || -> Result<IpcResponse> {
|
||||
let c_pipe_name = match CString::new(IPC_SOCKET_NAME) {
|
||||
Ok(name) => name,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user