signals: Fix Windows

Commit `41d776be4120df9f84633f1d54c1a1de27624c4e` accidentally broke
`radicle-signals` by a simple confusion of
`std::sync::mpsc::{,Sync}Sender`.
This commit is contained in:
Lorenz Leutgeb
2026-07-22 16:26:47 +02:00
parent 2ae6301f86
commit c2af4b5982
+2 -2
View File
@@ -10,7 +10,7 @@ use ::windows::core::BOOL;
use crate::{Signal, already_installed};
static NOTIFY: OnceLock<mpsc::Sender<Signal>> = OnceLock::new();
static NOTIFY: OnceLock<mpsc::SyncSender<Signal>> = OnceLock::new();
/// Callback function, called by the system when a control signal is to be received.
/// See <https://learn.microsoft.com/en-us/windows/console/handlerroutine>.
@@ -38,7 +38,7 @@ unsafe extern "system" fn handler(ctrltype: u32) -> BOOL {
/// Install global signal handlers, with notifications sent to the given
/// `notify` channel.
pub fn install(notify: mpsc::Sender<Signal>) -> io::Result<()> {
pub fn install(notify: mpsc::SyncSender<Signal>) -> io::Result<()> {
if let Err(_) = NOTIFY.set(notify) {
return Err(already_installed());
}