33namespace React \EventLoop ;
44
55use React \EventLoop \Tick \FutureTickQueue ;
6- use React \EventLoop \Tick \NextTickQueue ;
76use React \EventLoop \Timer \Timer ;
87use React \EventLoop \Timer \TimerInterface ;
98use React \EventLoop \Timer \Timers ;
@@ -15,7 +14,6 @@ class StreamSelectLoop implements LoopInterface
1514{
1615 const MICROSECONDS_PER_SECOND = 1000000 ;
1716
18- private $ nextTickQueue ;
1917 private $ futureTickQueue ;
2018 private $ timers ;
2119 private $ readStreams = [];
@@ -26,7 +24,6 @@ class StreamSelectLoop implements LoopInterface
2624
2725 public function __construct ()
2826 {
29- $ this ->nextTickQueue = new NextTickQueue ($ this );
3027 $ this ->futureTickQueue = new FutureTickQueue ($ this );
3128 $ this ->timers = new Timers ();
3229 }
@@ -132,14 +129,6 @@ public function isTimerActive(TimerInterface $timer)
132129 return $ this ->timers ->contains ($ timer );
133130 }
134131
135- /**
136- * {@inheritdoc}
137- */
138- public function nextTick (callable $ listener )
139- {
140- $ this ->nextTickQueue ->add ($ listener );
141- }
142-
143132 /**
144133 * {@inheritdoc}
145134 */
@@ -153,8 +142,6 @@ public function futureTick(callable $listener)
153142 */
154143 public function tick ()
155144 {
156- $ this ->nextTickQueue ->tick ();
157-
158145 $ this ->futureTickQueue ->tick ();
159146
160147 $ this ->timers ->tick ();
@@ -170,14 +157,12 @@ public function run()
170157 $ this ->running = true ;
171158
172159 while ($ this ->running ) {
173- $ this ->nextTickQueue ->tick ();
174-
175160 $ this ->futureTickQueue ->tick ();
176161
177162 $ this ->timers ->tick ();
178163
179- // Next -tick or future-tick queues have pending callbacks ...
180- if (!$ this ->running || !$ this ->nextTickQueue -> isEmpty () || ! $ this -> futureTickQueue ->isEmpty ()) {
164+ // Future -tick queue has pending callbacks ...
165+ if (!$ this ->running || !$ this ->futureTickQueue ->isEmpty ()) {
181166 $ timeout = 0 ;
182167
183168 // There is a pending timer, only block until it is due ...
0 commit comments