summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/threads/t/join.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/threads/t/join.t b/ext/threads/t/join.t
index 472d1d206d..dbd64487de 100644
--- a/ext/threads/t/join.t
+++ b/ext/threads/t/join.t
@@ -25,6 +25,8 @@ use Devel::Peek qw(Dump);
sub ok {
my ($ok, $name) = @_;
+ lock $test_id; # make print and increment atomic
+
# You have to do it this way or VMS will get confused.
print $ok ? "ok $test_id - $name\n" : "not ok $test_id - $name\n";
@@ -149,6 +151,7 @@ if ($^O eq 'linux') {
# purpose is to incite a lot of calls to newCONSTSUB. See the p5p
# archives for the thread "maint@20974 or before broke mp2 ithreads test".
use IO::File;
+ # this coredumped between #20930 and #21000
$_->join for map threads->new(sub{ok($_, "stress newCONSTSUB")}), 1..2;
}