Skip to content

Commit

Permalink
Added method Dplr::hasTasks()
Browse files Browse the repository at this point in the history
  • Loading branch information
muxx committed Aug 20, 2019
1 parent 96dd94a commit 8addb0f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Dplr/Dplr.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ protected function resetTasks(): void
$this->tasksThread = 0;
}

public function hasTasks(): bool
{
foreach ($this->tasks as $taskThread) {
if (count($taskThread) > 0) {
return true;
}
}

return false;
}

protected function checkState(): void
{
if (self::STATE_RUNNING === $this->state) {
Expand Down

0 comments on commit 8addb0f

Please sign in to comment.