mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-16 01:51:16 -03:00
Fix Principal topic monitor not initialized panic
Like 1b16d318cc, reproduces with `cargo test test_pthread`
Fix by using stdlib `println!` to avoid interacting with topicMonitor.
Enable `allow-print-in-tests` like with crates/printf, such that there i
no deny-warning.
This commit is contained in:
committed by
Peter Ammon
parent
8dee291200
commit
79bf53aaa5
@@ -458,7 +458,7 @@ struct Context {
|
||||
let made = spawn(move || {
|
||||
ctx2.val.fetch_add(2, Ordering::Release);
|
||||
ctx2.condvar.notify_one();
|
||||
printf!("condvar signalled\n");
|
||||
println!("condvar signalled");
|
||||
});
|
||||
assert!(made);
|
||||
|
||||
@@ -466,9 +466,9 @@ struct Context {
|
||||
let (_lock, timeout) = ctx
|
||||
.condvar
|
||||
.wait_timeout_while(lock, Duration::from_secs(5), |()| {
|
||||
printf!("looping with lock held\n");
|
||||
println!("looping with lock held");
|
||||
if ctx.val.load(Ordering::Acquire) != 5 {
|
||||
printf!("test_pthread: value did not yet reach goal\n");
|
||||
println!("test_pthread: value did not yet reach goal");
|
||||
return true;
|
||||
}
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user