Changeset 11063
- Timestamp:
- 03/11/10 03:05:36 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/TaskManager.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/TaskManager.pm
r11060 r11063 76 76 use threads::shared; 77 77 use Thread::Queue 2.11; 78 use Time::HiRes qw(gettimeofday tv_interval); 78 79 79 80 require Padre; … … 426 427 $self->task_queue->insert( 0, ("STOP") x scalar(@workers) ); 427 428 428 my $ loopcount;429 my $waitstart = [gettimeofday()]; 429 430 430 431 # Changing the selection seems to solve the endless-loop problem … … 434 435 $_->join; 435 436 } 436 last if $loopcount > 125; # Wait no more than two minutes 437 # Pass time slices to the threads for finishing 438 sleep 1 if ++$loopcount > 5; 437 438 # Wait no more than two minutes 439 last if( tv_interval($waitstart) >= (2*60) ); 440 441 # Pass time slices to the threads for finishing 442 threads->yield(); 439 443 } 440 444
Note: See TracChangeset
for help on using the changeset viewer.
