- 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() ) {
- or download this
# {
lock %{ $stat{'lock'} };
$c = $listener->accept() or next LOOP;
# }
- or download this
sub do_worker {
my $t = threads->self()->tid();
...
# fix me, yield can't achieve our purpose, why?
# threads->yield();
sleep(1);