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 */
@@ -156,14 +145,12 @@ public function run()
156145 $ this ->running = true ;
157146
158147 while ($ this ->running ) {
159- $ this ->nextTickQueue ->tick ();
160-
161148 $ this ->futureTickQueue ->tick ();
162149
163150 $ this ->timers ->tick ();
164151
165- // Next -tick or future-tick queues have pending callbacks ...
166- if (!$ this ->running || !$ this ->nextTickQueue -> isEmpty () || ! $ this -> futureTickQueue ->isEmpty ()) {
152+ // Future -tick queue has pending callbacks ...
153+ if (!$ this ->running || !$ this ->futureTickQueue ->isEmpty ()) {
167154 $ timeout = 0 ;
168155
169156 // There is a pending timer, only block until it is due ...
0 commit comments