diff options
Diffstat (limited to 'lib/App/Glacier/DB/GDBM.pm')
-rw-r--r-- | lib/App/Glacier/DB/GDBM.pm | 11 |
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 | |||
@@ -7,4 +7,8 @@ use File::Basename; | |||
7 | use File::Path qw(make_path); | 7 | use File::Path qw(make_path); |
8 | 8 | ||
9 | # Avoid coredumps in threaded code. | ||
10 | # See https://rt.perl.org/Public/Bug/Display.html?id=61912. | ||
11 | sub CLONE_SKIP { 1 } | ||
12 | |||
9 | sub new { | 13 | sub new { |
10 | my $class = shift; | 14 | my $class = shift; |
@@ -53,9 +57,6 @@ sub configtest { | |||
53 | } | 57 | } |
54 | 58 | ||
55 | # We can't tie the DB to $self->{_map} at once, in the new method, because | 59 | # Tie in the database, run $code, and untie it again. Correctly handle |
56 | # this will cause coredumps in threaded code (see | 60 | # nested invocations to avoid deadlocking. |
57 | # https://rt.perl.org/Public/Bug/Display.html?id=61912). So, the following | ||
58 | # auxiliary method is used, which calls &$code with $self->{_map} tied | ||
59 | # to the DB. | ||
60 | sub _tied { | 61 | sub _tied { |
61 | my ($self, $code) = @_; | 62 | my ($self, $code) = @_; |