Skip to content

Commit d45e985

Browse files
author
Vytautas Astrauskas
committed
Clarify FIXME.
1 parent 8a7dbde commit d45e985

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/thread.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,12 @@ impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
357357
if self.threads[MAIN_THREAD].state == ThreadState::Terminated {
358358
// The main thread terminated; stop the program.
359359
if self.threads.iter().any(|thread| thread.state != ThreadState::Terminated) {
360-
// FIXME: This check should be either configurable or just emit a warning.
360+
// FIXME: This check should be either configurable or just emit
361+
// a warning. For example, it seems normal for a program to
362+
// terminate without waiting for its detached threads to
363+
// terminate. However, this case is not trivial to support
364+
// because we also probably do not want to consider the memory
365+
// owned by these threads as leaked.
361366
throw_unsup_format!("the main thread terminated without waiting for other threads");
362367
}
363368
return Ok(SchedulingAction::Stop);

0 commit comments

Comments
 (0)