Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #175 from basz/fix/interuptable
Browse files Browse the repository at this point in the history
PHP7 compatibility
  • Loading branch information
bakura10 committed Dec 17, 2015
2 parents 9a50503 + 7ada84f commit dee2b91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Strategy/InterruptStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public function __construct(array $options = null)

// Conditional because of lack of pcntl_signal on windows
if (function_exists('pcntl_signal')) {
declare(ticks = 1);
pcntl_signal(SIGTERM, [$this, 'onPCNTLSignal']);
pcntl_signal(SIGINT, [$this, 'onPCNTLSignal']);
}
Expand Down Expand Up @@ -57,6 +56,8 @@ public function attach(EventManagerInterface $events, $priority = 1)
*/
public function onStopConditionCheck(WorkerEvent $event)
{
declare(ticks = 1);

if ($this->interrupted) {
$event->exitWorkerLoop();

Expand Down

0 comments on commit dee2b91

Please sign in to comment.