Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ configured by `scripts/dev_windows.ps1` builds
Publisher acceptance, request sampling, graph-capacity selection, and HTTP APIs
follow the [CLI specification](cli-design.md). The default trust store is
`Flare\trust.toml` under the Windows Local App Data known folder. `--trust-store`
selects another path. Ctrl-C and Ctrl-Break drain native work before releasing
CUDA resources.
selects another path. Ctrl-C and Ctrl-Break end loading immediately and drain
native work before releasing CUDA resources once serving has started.

Disk embedding tables use Windows I/O rings with registered files and buffers.
All core shards share each worker's ring and staging allocation; file indices
Expand Down
13 changes: 7 additions & 6 deletions flare-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ fn run() -> Result<std::process::ExitCode, Box<dyn std::error::Error>> {
{
return Err("multi-host serving is not supported on Windows".into());
}
#[cfg(windows)]
unsafe {
if windows_sys::Win32::System::Console::SetConsoleCtrlHandler(Some(stop_console), 1) == 0 {
return Err(std::io::Error::last_os_error().into());
}
}
let bind = args.bind_address();
if args.rank.is_some_and(|rank| rank != 0) {
args.serving.select_gpus(1);
Expand Down Expand Up @@ -707,6 +701,13 @@ fn serve_local(
libc::signal(libc::SIGINT, stop as *const () as libc::sighandler_t);
libc::signal(libc::SIGTERM, stop as *const () as libc::sighandler_t);
}
#[cfg(windows)]
unsafe {
// Loading keeps the default Ctrl-C termination; nothing reads STOP before serving.
if windows_sys::Win32::System::Console::SetConsoleCtrlHandler(Some(stop_console), 1) == 0 {
return Err(std::io::Error::last_os_error().into());
}
}
progress.finish_animation();
if let Err(error) = server.start_dashboard() {
eprintln!("Could not start dashboard: {error}");
Expand Down