r43732 - in /trunk/libthread-pool-simple-perl: Changes META.yml Simple.pm debian/changelog debian/compat debian/control debian/rules

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Sep 5 03:07:42 UTC 2009


Author: jawnsy-guest
Date: Sat Sep  5 03:06:40 2009
New Revision: 43732

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43732
Log:
TODO: fix copyright
* New upstream release
  + Fix bug when running under the Perl debugger
  + Remove redundant '':locked method''
* Standards-Version 3.8.3 (drop version dependency on perl)
* Added myself to Uploaders
* Bump debhelper requirement to 7, compat
* Use short debhelper rules format

Modified:
    trunk/libthread-pool-simple-perl/Changes
    trunk/libthread-pool-simple-perl/META.yml
    trunk/libthread-pool-simple-perl/Simple.pm
    trunk/libthread-pool-simple-perl/debian/changelog
    trunk/libthread-pool-simple-perl/debian/compat
    trunk/libthread-pool-simple-perl/debian/control
    trunk/libthread-pool-simple-perl/debian/rules

Modified: trunk/libthread-pool-simple-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/Changes?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/Changes (original)
+++ trunk/libthread-pool-simple-perl/Changes Sat Sep  5 03:06:40 2009
@@ -1,4 +1,9 @@
 Revision history for Perl extension Thread::Pool::Simple.
+
+0.24  3 SEP 2009
+      	- used a workaround to avoid a rare problem when running under
+	  perl debuger (thanks to Kevin Brintnall)
+	- removed redundant ``:locked method'' 
 
 0.23  24 MAY 2007
         - only calling ``sleep'' when not busy to avoid 1 sec delay

Modified: trunk/libthread-pool-simple-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/META.yml?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/META.yml (original)
+++ trunk/libthread-pool-simple-perl/META.yml Sat Sep  5 03:06:40 2009
@@ -1,10 +1,13 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Thread-Pool-Simple
-version:      0.23
-version_from: Simple.pm
-installdirs:  site
-requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+--- #YAML:1.0
+name:                Thread-Pool-Simple
+version:             0.24
+abstract:            ~
+license:             ~
+author:              
+    - Jianyuan Wu <jwu at cpan.org>
+generated_by:        ExtUtils::MakeMaker version 6.42
+distribution_type:   module
+requires:     
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libthread-pool-simple-perl/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/Simple.pm?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/Simple.pm (original)
+++ trunk/libthread-pool-simple-perl/Simple.pm Sat Sep  5 03:06:40 2009
@@ -9,7 +9,7 @@
 use Thread::Queue;
 use Thread::Semaphore;
 
-our $VERSION = '0.23';
+our $VERSION = '0.24';
 
 sub new {
     my ($class, %arg) = @_;
@@ -37,14 +37,16 @@
     $self->{shutdown_lock} = Thread::Semaphore->new();
     bless $self, $class;
     $self->{shutdown_lock}->down();
-    async {
-        $self->_run(\%handler);
-        $self->{shutdown_lock}->up();
-    }->detach();
+    my $thr = threads->new(
+	sub {
+	    $self->_run(\%handler);
+	    $self->{shutdown_lock}->up();
+	}) or croak "fail to create new thread"; 
+    $thr->detach();
     return $self;
 }
 
-sub _run : locked method {
+sub _run {
     my ($self, $handler) = @_;
     while (1) {
         last if $self->terminating();
@@ -63,7 +65,7 @@
     }
 }
 
-sub _increase : locked method {
+sub _increase {
     my ($self, $handler) = @_;
     my $max = do { lock %{$self->{config}}; $self->{config}{max} };
     my $worker = do { lock ${$self->{worker}}; ${$self->{worker}} };
@@ -171,7 +173,7 @@
     }
 }
 
-sub _state : locked method {
+sub _state {
     my $self = shift;
     my $state = $self->{state};
     lock $$state;
@@ -181,7 +183,7 @@
     return $s;
 }
 
-sub join : locked method {
+sub join {
     my ($self, $nb) = @_;
     $self->_state(-1);
     my $max = do { lock %{$self->{config}}; $self->{config}{max} };
@@ -191,12 +193,12 @@
     sleep 1; # cool down, otherwise may coredump while run tests
 }
 
-sub detach : locked method {
+sub detach {
     my ($self) = @_;
     $self->join(1);
 }
 
-sub busy : locked method {
+sub busy {
     my ($self) = @_;
     my $worker = do { lock ${$self->{worker}}; ${$self->{worker}} };
     my ($min, $max, $load) = do { lock %{$self->{config}}; @{$self->{config}}{'min', 'max', 'load'} };
@@ -207,7 +209,7 @@
     return $worker < $min || $pending > $worker * $load;
 }
 
-sub terminating : locked method {
+sub terminating {
     my ($self) = @_;
     my $state = $self->_state();
     my $job = do { lock %{$self->{submitted}}; keys %{$self->{submitted}} };
@@ -216,7 +218,7 @@
     return;
 }
 
-sub config : locked method {
+sub config {
     my $self = shift;
     my $config = $self->{config};
     lock %$config;
@@ -225,7 +227,7 @@
     return %$config;
 }
 
-sub add : locked method {
+sub add {
     my $self = shift;
     my $context = wantarray;
     $context = 2 unless defined $context; # void context = 2
@@ -252,25 +254,25 @@
     return $id;
 }
 
-sub job_exists : locked method {
+sub job_exists {
     my ($self, $id) = @_;
     lock %{$self->{submitted}};
     return $self->{submitted}{$id};
 }
 
-sub job_done : locked method {
+sub job_done {
     my ($self, $id) = @_;
     lock %{$self->{done}};
     return $self->{done}{$id};
 }
 
-sub _drop : locked method {
+sub _drop {
     my ($self, $id) = @_;
     lock %{$self->{submitted}};
     delete $self->{submitted}{$id};
 }
 
-sub _remove : locked method {
+sub _remove {
     my ($self, $id, $nb) = @_;
     return if $id % 3 == 2;
     return unless $self->job_exists($id);
@@ -292,19 +294,19 @@
     return ($exist, $ret->[0]);
 }
 
-sub remove : locked method {
+sub remove {
     my ($self, $id) = @_;
     my ($exist, @ret) = $self->_remove($id);
     return @ret;
 }
 
 
-sub remove_nb : locked method {
+sub remove_nb {
     my ($self, $id) = @_;
     return $self->_remove($id, 1);
 }
 
-sub cancel : locked method {
+sub cancel {
     my ($self, $id) = @_;
     my ($exist) = eval { $self->remove_nb($id) };
     if (!$exist) {
@@ -313,7 +315,7 @@
     }
 }
 
-sub cancel_all : locked method {
+sub cancel_all {
     my ($self) = @_;
     my @id = do { lock %{$self->{submitted}}; keys %{$self->{submitted}} };
     for (@id) {

Modified: trunk/libthread-pool-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/debian/changelog?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/debian/changelog (original)
+++ trunk/libthread-pool-simple-perl/debian/changelog Sat Sep  5 03:06:40 2009
@@ -1,4 +1,15 @@
-libthread-pool-simple-perl (0.23-4) UNRELEASED; urgency=low
+libthread-pool-simple-perl (0.24-1) UNRELEASED; urgency=low
+
+  TODO: fix copyright
+
+  [ Jonathan Yu ]
+  * New upstream release
+    + Fix bug when running under the Perl debugger
+    + Remove redundant '':locked method''
+  * Standards-Version 3.8.3 (drop version dependency on perl)
+  * Added myself to Uploaders
+  * Bump debhelper requirement to 7, compat
+  * Use short debhelper rules format
 
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -7,7 +18,7 @@
   [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:48:24 +0100
+ -- Jonathan Yu <jawnsy at cpan.org>  Fri, 04 Sep 2009 18:58:55 -0400
 
 libthread-pool-simple-perl (0.23-3) unstable; urgency=medium
 

Modified: trunk/libthread-pool-simple-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/debian/compat?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/debian/compat (original)
+++ trunk/libthread-pool-simple-perl/debian/compat Sat Sep  5 03:06:40 2009
@@ -1,1 +1,1 @@
-5
+7

Modified: trunk/libthread-pool-simple-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/debian/control?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/debian/control (original)
+++ trunk/libthread-pool-simple-perl/debian/control Sat Sep  5 03:06:40 2009
@@ -1,12 +1,13 @@
 Source: libthread-pool-simple-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0)
-Build-Depends-Indep: perl (>= 5.005)
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Gonéri Le Bouder <goneri at rulezlan.org>,
- gregor herrmann <gregoa at debian.org>, Damyan Ivanov <dmn at debian.org>
-Standards-Version: 3.8.0
+ gregor herrmann <gregoa at debian.org>, Damyan Ivanov <dmn at debian.org>,
+ Jonathan Yu <jawnsy at cpan.org>
+Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/Thread-Pool-Simple/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libthread-pool-simple-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libthread-pool-simple-perl/
@@ -14,9 +15,7 @@
 Package: libthread-pool-simple-perl
 Architecture: all
 Depends: ${perl:Depends}, ${misc:Depends}, 
-Description:  A simple thread-pool implementation
- Thread::Pool::Simple provides a simple thread-pool implementaion
- without external dependencies outside core modules.
- .
- Jobs can be submitted to and handled by multi-threaded `workers'
- managed by the pool.
+Description: Perl implementation of a simple thread pool
+ Thread::Pool::Simple provides a simple thread-pool implementation without
+ external dependencies outside core modules. Jobs can be submitted to and
+ handled by multi-threaded 'workers' managed by the pool.

Modified: trunk/libthread-pool-simple-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libthread-pool-simple-perl/debian/rules?rev=43732&op=diff
==============================================================================
--- trunk/libthread-pool-simple-perl/debian/rules (original)
+++ trunk/libthread-pool-simple-perl/debian/rules Sat Sep  5 03:06:40 2009
@@ -1,83 +1,4 @@
 #!/usr/bin/make -f
-# This debian/rules file is provided as a template for normal perl
-# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
-# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
-# be used freely wherever it is useful.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# If set to a true value then MakeMaker's prompt function will
-# always return the default without waiting for user input.
-export PERL_MM_USE_DEFAULT=1
-
-PACKAGE=$(shell dh_listpackages)
-
-ifndef PERL
-PERL = /usr/bin/perl
-endif
-
-TMP     =$(CURDIR)/debian/$(PACKAGE)
-
-build: build-stamp
-build-stamp:
-	dh_testdir
-
-	# Add commands to compile the package here
-	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="-Wall -O2 -g"
-	$(MAKE) test
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-
-	# Add commands to clean up after the build process here
-	[ ! -f Makefile ] || $(MAKE) realclean
-
-	dh_clean build-stamp install-stamp
-
-install: build install-stamp
-install-stamp:
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-
-	# Add commands to install the package into debian/$PACKAGE_NAME here
-	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-
-	# As this is a architecture independent package, we are not
-	# supposed to install stuff to /usr/lib. MakeMaker creates
-	# the dirs, we delete them from the deb:
-	[ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5
-
-	touch install-stamp
-
-binary-arch:
-# We have nothing to do by default.
-
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-#	dh_installcron
-#	dh_installmenu
-#	dh_installexamples
-	dh_installdocs README
-	dh_installchangelogs Changes
-	dh_perl
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-source diff:                                                                  
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+%:
+	dh $@




More information about the Pkg-perl-cvs-commits mailing list