thread: don't leak the thread in spawnManager (#21379)

This commit is contained in:
David Rubin 2024-09-10 18:04:59 -07:00 committed by GitHub
parent 8ec68c63fa
commit 421fbd939c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,5 +63,6 @@ pub fn spawnManager(
}
};
wg.start();
_ = std.Thread.spawn(.{}, Manager.run, .{ wg, args }) catch Manager.run(wg, args);
const t = std.Thread.spawn(.{}, Manager.run, .{ wg, args }) catch return Manager.run(wg, args);
t.detach();
}