Improved chunk sending, moved chunk encoding and compression to another thread

This commit is contained in:
Shoghi Cervantes
2014-07-05 20:41:30 +02:00
parent 417cb94ea3
commit 22552cdd72
9 changed files with 253 additions and 85 deletions

View File

@ -215,12 +215,12 @@ class ServerScheduler{
if($this->asyncTasks > 0){ //Garbage collector
$this->asyncPool->collect(function (AsyncTask $task){
if($task->isFinished()){
if($task->isFinished() and !$task->isCompleted()){
--$this->asyncTasks;
$task->onCompletion(Server::getInstance());
$task->setCompleted();
return true;
}
return false;
});
}