httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject [Fwd: [cpan #6800] Thread safety: work around perl sort bug]
Date Wed, 30 Jun 2004 12:30:07 GMT


-------- Original Message --------
Subject: [cpan #6800] Thread safety: work around perl sort bug
Date: Wed, 30 Jun 2004 05:42:03 -0400 (EDT)
From: Guest via RT <bug-Apache-Test@rt.cpan.org>
Reply-To: bug-Apache-Test@rt.cpan.org
To: undisclosed-recipients:;


This message about Apache-Test was sent to you by guest <> via rt.cpan.org

Full context and any attached attachments can be found at:
<URL: https://rt.cpan.org/Ticket/Display.html?id=6800 >

perl-5.8.4. Apache-Test-1.12.
If thread safety is important to this module, suggest in TestServer.pm
you change:
  my $by_port = sub { $vh->{$a}->{port} <=> $vh->{$b}->{port} };

  for my $module (sort $by_port keys %$vh) {
to, something like:
  for my $module (sort { $vh->{$a}->{port} <=> $vh->{$b}->{port} } keys
%$vh) {

i.e. inline the sort sub to work around perl bug #30333
"threads sort crashes with sort subroutine (but not with sort block)".

/-\

Mime
View raw message