public function collectGarbage()
    {
        $this->synchronized(function () {
            foreach ($this->timerTasks as $taskId => $timerTask) {
                if ($timerTask->isRunning()) {
                    continue;
                } else {
                    unset($this->timerTasks[$taskId]);
                }
            }
        });
    }
public function collectGarbage()
    {
        $this->synchronized(function () {
            foreach ($this->timerTasks as $taskId => $timerTask) {
                if ($timerTask->isRunning()) {
                    continue;
                } else {
                    unset($this->timerTasks[$taskId]);
                }
            }
        });
    }
public function collectGarbage ( ) { $ this -> synchronized ( function ( ) { foreach ( $ this -> timerTasks as $ taskId => $ timerTask ) { if ( $ timerTask -> isRunning ( ) ) { continue ; } else { unset ( $ this -> timerTasks [ $ taskId ] ) ; } } } ) ; }
Collect the finished timer task jobs.

@return void
Collect the finished timer task jobs .