Skip to content

Commit

Permalink
Removed the flags property as pointed out by @clue at reactphp#112 (c…
Browse files Browse the repository at this point in the history
…omment)

The property was only used in one method and adding more bloat than solving a problem
  • Loading branch information
WyriHaximus committed Dec 10, 2018
1 parent cf50735 commit b390839
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/ExtUvLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ final class ExtUvLoop implements LoopInterface
private $futureTickQueue;
private $timers;
private $streamEvents = array();
private $flags = array();
private $readStreams = array();
private $writeStreams = array();
private $running;
Expand Down Expand Up @@ -248,7 +247,6 @@ private function removeStream($stream)
\uv_poll_stop($this->streamEvents[(int) $stream]);
\uv_close($this->streamEvents[(int) $stream]);
unset($this->streamEvents[(int) $stream]);
unset($this->flags[(int) $stream]);
return;
}

Expand All @@ -270,12 +268,6 @@ private function pollStream($stream)
$flags |= \UV::WRITABLE;
}

if (isset($this->flags[(int) $stream]) && $this->flags[(int) $stream] == $flags) {
return;
}

$this->flags[(int) $stream] = $flags;

\uv_poll_start($this->streamEvents[(int) $stream], $flags, $this->streamListener);
}

Expand All @@ -288,7 +280,6 @@ private function createStreamListener()
{
$callback = function ($event, $status, $events, $stream) {
if ($status !== 0) {
unset($this->flags[(int) $stream]);
$this->pollStream($stream);
}

Expand Down

0 comments on commit b390839

Please sign in to comment.