summaryrefslogtreecommitdiffabout
path: root/lib/App/Glacier/DB/GDBM.pm
Side-by-side diff
Diffstat (limited to 'lib/App/Glacier/DB/GDBM.pm') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/App/Glacier/DB/GDBM.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/App/Glacier/DB/GDBM.pm b/lib/App/Glacier/DB/GDBM.pm
index 0e14a65..f7cc29a 100644
--- a/lib/App/Glacier/DB/GDBM.pm
+++ b/lib/App/Glacier/DB/GDBM.pm
@@ -8,2 +8,6 @@ use File::Path qw(make_path);
+# Avoid coredumps in threaded code.
+# See https://rt.perl.org/Public/Bug/Display.html?id=61912.
+sub CLONE_SKIP { 1 }
+
sub new {
@@ -54,7 +58,4 @@ sub configtest {
-# We can't tie the DB to $self->{_map} at once, in the new method, because
-# this will cause coredumps in threaded code (see
-# https://rt.perl.org/Public/Bug/Display.html?id=61912). So, the following
-# auxiliary method is used, which calls &$code with $self->{_map} tied
-# to the DB.
+# Tie in the database, run $code, and untie it again. Correctly handle
+# nested invocations to avoid deadlocking.
sub _tied {

Return to:

Send suggestions and report system problems to the System administrator.