Help for this page

Select Code to Download


  1. or download this
    LOOP:    while ( !$stat{'work'}{$t}{'stat'} ne 'done' ) {
                {
    ...
                # but then we can't gain advantage of the multi-threads no
    +r the pre-threads
                # design.
                if ( my $r = $c->get_request() ) {
    
  2. or download this
    #            {
                    lock %{ $stat{'lock'} };
                    $c = $listener->accept() or next LOOP;
    #            }
    
  3. or download this
        sub do_worker {
            my $t = threads->self()->tid();
    ...
            # fix me, yield can't achieve our purpose, why?
            # threads->yield();
            sleep(1);