summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/Misc.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-05 15:44:35 +0200
committerYorhel <git@yorhel.nl>2009-08-05 15:44:35 +0200
commit4cb49d6a28a0392fbd9a50c39a350ce3cf4b5521 (patch)
treed040956bd4547bc6e7f547065f8e502f751903db /lib/VNDB/Util/Misc.pm
parente8a58a755ad484a07da3832651cbce18a602bf4d (diff)
Removed last traces of the shared memory processing queue
Everything has now finally been converted to use the PgSQL LISTEN/NOTIFY feature. This commit removes the last Tie::ShareLite dependency.
Diffstat (limited to 'lib/VNDB/Util/Misc.pm')
-rw-r--r--lib/VNDB/Util/Misc.pm32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm
deleted file mode 100644
index f4eb5a7c..00000000
--- a/lib/VNDB/Util/Misc.pm
+++ /dev/null
@@ -1,32 +0,0 @@
-
-package VNDB::Util::Misc;
-
-use strict;
-use warnings;
-use Exporter 'import';
-use Tie::ShareLite ':lock';
-
-our @EXPORT = qw|multiCmd|;
-
-
-# Sends a command to Multi
-# Argument: the commands to add to the queue, or none to send the queue to Multi
-sub multiCmd {
- my $self = shift;
-
- $self->{_multiCmd} = [] if !$self->{_multiCmd};
- return push @{$self->{_multiCmd}}, @_ if @_;
-
- return if !@{$self->{_multiCmd}};
-
- my $s = tie my %s, 'Tie::ShareLite', -key => $self->{sharedmem_key}, -create => 'yes', -destroy => 'no', -mode => 0666;
- $s->lock(LOCK_EX);
- my @q = ( ($s{queue} ? @{$s{queue}} : ()), @{$self->{_multiCmd}} );
- $s{queue} = \@q;
- $s->unlock();
- $self->{_multiCmd} = [];
-}
-
-
-1;
-