Skip to content

Commit

Permalink
Revert "gc just to be safe prior to run loop exit"
Browse files Browse the repository at this point in the history
This reverts commit ad48318.
  • Loading branch information
rdlowrey committed Aug 8, 2015
1 parent a806161 commit 6612bb8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions lib/EvReactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ public function run(callable $onStart = null) {
$this->loop->run($flags);
}

\gc_collect_cycles();

$this->state = self::STOPPED;
if ($this->stopException) {
$e = $this->stopException;
Expand Down
2 changes: 0 additions & 2 deletions lib/LibeventReactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ public function run(callable $onStart = null) {
\event_base_loop($this->keepAliveBase, $flags);
}

\gc_collect_cycles();

$this->state = self::STOPPED;
if ($this->stopException) {
$e = $this->stopException;
Expand Down
2 changes: 0 additions & 2 deletions lib/NativeReactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public function run(callable $onStart = null) {
}
}

\gc_collect_cycles();

$this->timersEnabled = false;
$this->state = self::STOPPED;
}
Expand Down
6 changes: 2 additions & 4 deletions lib/UvReactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public function run(callable $onStart = null) {
\uv_run($this->loop, \UV::RUN_DEFAULT | (empty($this->immediates) ? \UV::RUN_ONCE : \UV::RUN_NOWAIT));
}

\gc_collect_cycles();

$this->state = self::STOPPED;
if ($this->stopException) {
$e = $this->stopException;
Expand Down Expand Up @@ -136,7 +134,7 @@ public function tick($noWait = false) {
"Cannot tick() recursively; event reactor already active"
);
}

$this->state = self::TICKING;

$noWait = (bool) $noWait;
Expand All @@ -146,7 +144,7 @@ public function tick($noWait = false) {
break;
}
}

// Check the conditional again because a manual stop() could've changed the state
if ($this->state) {
$flags = $noWait || !empty($this->immediates) ? (\UV::RUN_NOWAIT | \UV::RUN_ONCE) : \UV::RUN_ONCE;
Expand Down

0 comments on commit 6612bb8

Please sign in to comment.