File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use Config;
8
8
9
9
use Scalar::Util qw( reftype refaddr blessed) ;
10
10
11
- our $VERSION = ' 1.69 ' ; # Please update the pod, too.
11
+ our $VERSION = ' 1.70 ' ; # Please update the pod, too.
12
12
my $XS_VERSION = $VERSION ;
13
13
$VERSION = eval $VERSION ;
14
14
@@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads
196
196
197
197
=head1 VERSION
198
198
199
- This document describes threads::shared version 1.68
199
+ This document describes threads::shared version 1.70
200
200
201
201
=head1 SYNOPSIS
202
202
Original file line number Diff line number Diff line change @@ -1284,6 +1284,21 @@ S_shared_signal_hook(pTHX) {
1284
1284
}
1285
1285
#endif
1286
1286
1287
+ #ifdef noshutdownhook
1288
+
1289
+ static shutdown_proc_t old_shutdownhook ;
1290
+
1291
+ static void
1292
+ shared_shutdown () {
1293
+ PerlInterpreter * my_perl ;
1294
+ SHARED_CONTEXT ;
1295
+ perl_destruct (PL_sharedsv_space );
1296
+ perl_free (PL_sharedsv_space );
1297
+ PL_sharedsv_space = NULL ;
1298
+ old_shutdownhook ();
1299
+ }
1300
+ #endif
1301
+
1287
1302
/* Saves a space for keeping SVs wider than an interpreter. */
1288
1303
1289
1304
static void
@@ -1299,6 +1314,12 @@ Perl_sharedsv_init(pTHX)
1299
1314
LEAVE ; /* This balances the ENTER at the end of perl_construct. */
1300
1315
PERL_SET_CONTEXT ((aTHX = caller_perl ));
1301
1316
recursive_lock_init (aTHX_ & PL_sharedsv_lock );
1317
+ #ifdef noshutdownhook
1318
+ OP_CHECK_MUTEX_LOCK ;
1319
+ old_shutdownhook = PL_shutdownhook ;
1320
+ PL_shutdownhook = & shared_shutdown ;
1321
+ OP_CHECK_MUTEX_UNLOCK ;
1322
+ #endif
1302
1323
}
1303
1324
PL_lockhook = & Perl_sharedsv_locksv ;
1304
1325
PL_sharehook = & Perl_sharedsv_share ;
You can’t perform that action at this time.
0 commit comments