The thread may call exit if malloc() fails at some point, which will cause
the whole process to crash. We prevent this by passing 'exit =>
"threads_only"' to the threads.pm import method, which requires threads.pm
version 1.37.
=back
+=item *
+
+Notes :
+
+=over 8
+
+=item -
+
+C<< exit => 'threads_only' >> is passed to C<< threads->import >>.
+
+=back
+
=back
=cut
die "$test_module was loaded too soon" if defined $test_module;
}
- load_or_skip_all 'threads', $force ? '0' : '1.67', [ ];
+ load_or_skip_all 'threads', $force ? '0' : '1.67', [
+ exit => 'threads_only',
+ ];
load_or_skip_all 'threads::shared', $force ? '0' : '1.14', [ ];
diag "Threads testing forced by \$ENV{$force_var}" if $force;