summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-12 19:02:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-12 19:02:24 +0000
commitc133c03fba8fc439e535e387ad9f4605abbe0e8c (patch)
tree28668cf06f86e5f12ad07fbd1d14d5b477da9ebd /ext
parentf99693245dcd7253f84d04a114c24e08ce1ceea5 (diff)
downloadperl-c133c03fba8fc439e535e387ad9f4605abbe0e8c.tar.gz
Reword the "threads still running" cleanup message.
p4raw-id: //depot/perl@16561
Diffstat (limited to 'ext')
-rwxr-xr-xext/threads/threads.pm9
-rwxr-xr-xext/threads/threads.xs2
2 files changed, 6 insertions, 5 deletions
diff --git a/ext/threads/threads.pm b/ext/threads/threads.pm
index b4ee6d0ff1..dfc8b8f836 100755
--- a/ext/threads/threads.pm
+++ b/ext/threads/threads.pm
@@ -180,11 +180,12 @@ returns a thread object.
=over 4
-=item Cleanup skipped %d active threads
+=item A thread exited while %d other threads were still running
-The main thread exited while there were still other threads running.
-This is not a good sign: you should either explicitly join the threads,
-or somehow be certain that all the non-main threads have finished.
+A thread (not necessarily the main thread) exited while there were
+still other threads running. Usually it's a good idea to first collect
+the return values of the created threads by joining them, and only then
+exit from then main thread.
=back
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index 1c2c133ee1..271aa4ab5a 100755
--- a/ext/threads/threads.xs
+++ b/ext/threads/threads.xs
@@ -143,7 +143,7 @@ Perl_ithread_hook(pTHX)
int veto_cleanup = 0;
MUTEX_LOCK(&create_destruct_mutex);
if (aTHX == PL_curinterp && active_threads != 1) {
- Perl_warn(aTHX_ "Cleanup skipped %" IVdf " active threads",
+ Perl_warn(aTHX_ "A thread exited while %" IVdf " other threads were still running",
(IV)active_threads);
veto_cleanup = 1;
}