Skip to content
Merged
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
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Windows reserves only 1 MiB for the main thread by default. OctoSense's
// startup evaluates and constructs a large Makepad script/widget tree on that
// thread, whose bounded peak exceeds the default before the first window is
// shown. /STACK changes the PE address-space reserve; pages are still committed
// only as they are used.
fn main() {
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
let target_env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
if target_os == "windows" && target_env == "msvc" {
println!("cargo:rustc-link-arg-bins=/STACK:16777216");
}
}
9 changes: 6 additions & 3 deletions src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ use crate::host;
#[cfg(unix)]
use std::os::unix::process::CommandExt;

use makepad_widgets::makepad_platform::thread::{CancellationToken, Lane, SignalToUI, TaskPool, ThreadSpawner, ThreadOptions};
#[cfg(unix)]
use makepad_widgets::makepad_platform::thread::CancellationToken;
use makepad_widgets::makepad_platform::thread::{Lane, SignalToUI, TaskPool, ThreadSpawner, ThreadOptions};
#[cfg(any(unix, test))]
use makepad_widgets::Cx;

use crate::hub::ClientId;
Expand Down Expand Up @@ -643,7 +646,7 @@ pub fn kill_child_group(child: &mut Child, _grace: std::time::Duration, _pool: &
/// Final slot teardown owns the child from here on. Signal and reap it wholly
/// on a heavy pool worker; dropping a slot on the UI thread never waits for a
/// process or decoder wrapper to exit.
fn reap_child_group(mut child: Child, grace: std::time::Duration, pool: &TaskPool) {
fn reap_child_group(mut child: Child, _grace: std::time::Duration, pool: &TaskPool) {
#[cfg(unix)]
let pid = {
let pid = child.id() as i32;
Expand All @@ -656,7 +659,7 @@ fn reap_child_group(mut child: Child, grace: std::time::Duration, pool: &TaskPoo
#[cfg(unix)]
{
let wait = CancellationToken::new();
let _ = wait.wait_until(Cx::monotonic_now() + grace.as_secs_f64());
let _ = wait.wait_until(Cx::monotonic_now() + _grace.as_secs_f64());
if signal::alive(-pid) {
signal::kill_group(pid, signal::SIGKILL);
}
Expand Down