[Bps-public-commit] r10751 - in Net-Server-Coro: .

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Feb 6 22:58:13 EST 2008


Author: alexmv
Date: Wed Feb  6 22:58:11 2008
New Revision: 10751

Modified:
   Net-Server-Coro/   (props changed)
   Net-Server-Coro/lib/Net/Server/Coro.pm

Log:
 r27680 at zoq-fot-pik:  chmrr | 2008-02-06 22:57:51 -0500
  * Describe all of the coroutines


Modified: Net-Server-Coro/lib/Net/Server/Coro.pm
==============================================================================
--- Net-Server-Coro/lib/Net/Server/Coro.pm	(original)
+++ Net-Server-Coro/lib/Net/Server/Coro.pm	Wed Feb  6 22:58:11 2008
@@ -54,6 +54,7 @@
         my $prop = $SELF->{server};
         my $fh   = pop @FH;
         if ($fh) {
+            $Coro::current->desc("Active connection");
             $prop->{connected} = 1;
             $prop->{client} = $fh;
             $SELF->run_client_connection;
@@ -64,6 +65,7 @@
         } else {
             last if @POOL >= 20;    #$MAX_POOL;
             push @POOL, $Coro::current;
+            $Coro::current->desc("Idle connection");
             schedule;
         }
     }
@@ -76,6 +78,7 @@
 
     for my $socket ( @{ $prop->{sock} } ) {
         async {
+            $Coro::current->desc("Listening on port @{[$socket->sockport]}");
             while (1) {
                 $connections->down;
                 my $accepted = scalar $socket->accept;
@@ -96,6 +99,7 @@
         # when other things cede; this guarantees that we notice
         # socket activity and deal.
         $Coro::current->prio(3);
+        $Coro::current->desc("Event loop");
 
         # EV needs to service something before we notice signals.
         # This interrupts the event loop every 10 seconds to force it



More information about the Bps-public-commit mailing list