v watch: increase the default restart timeout, when vwatch.v is compiled with -gc boehm
parent
f0ad0b024e
commit
21fe91e508
|
@ -18,7 +18,11 @@ const max_scan_cycles = scan_timeout_s * scan_frequency_hz
|
||||||
fn get_scan_timeout_seconds() int {
|
fn get_scan_timeout_seconds() int {
|
||||||
env_vw_timeout := os.getenv('VWATCH_TIMEOUT').int()
|
env_vw_timeout := os.getenv('VWATCH_TIMEOUT').int()
|
||||||
if env_vw_timeout == 0 {
|
if env_vw_timeout == 0 {
|
||||||
return 5 * 60
|
$if gcboehm ? {
|
||||||
|
return 35000000 // over 1 year
|
||||||
|
} $else {
|
||||||
|
return 5 * 60
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return env_vw_timeout
|
return env_vw_timeout
|
||||||
}
|
}
|
||||||
|
@ -296,6 +300,7 @@ const ccontext = Context{
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
dump(scan_timeout_s)
|
||||||
mut context := unsafe { &Context(voidptr(&ccontext)) }
|
mut context := unsafe { &Context(voidptr(&ccontext)) }
|
||||||
context.pid = os.getpid()
|
context.pid = os.getpid()
|
||||||
context.vexe = os.getenv('VEXE')
|
context.vexe = os.getenv('VEXE')
|
||||||
|
|
Loading…
Reference in New Issue