File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ class LibEvLoop implements LoopInterface
12
12
private $ readEvents = array ();
13
13
private $ writeEvents = array ();
14
14
private $ timers = array ();
15
- private $ suspended = false ;
16
15
17
16
public function __construct ()
18
17
{
@@ -138,21 +137,11 @@ public function tick()
138
137
139
138
public function run ()
140
139
{
141
- // @codeCoverageIgnoreStart
142
- if ($ this ->suspended ) {
143
- $ this ->suspended = false ;
144
- $ this ->loop ->resume ();
145
- } else {
146
- $ this ->loop ->run ();
147
- }
148
- // @codeCoverageIgnoreEnd
140
+ $ this ->loop ->run ();
149
141
}
150
142
151
143
public function stop ()
152
144
{
153
- // @codeCoverageIgnoreStart
154
- $ this ->loop ->suspend ();
155
- $ this ->suspended = true ;
156
- // @codeCoverageIgnoreEnd
145
+ $ this ->loop ->breakLoop ();
157
146
}
158
147
}
Original file line number Diff line number Diff line change @@ -226,15 +226,11 @@ public function tick()
226
226
227
227
public function run ()
228
228
{
229
- // @codeCoverageIgnoreStart
230
229
event_base_loop ($ this ->base );
231
- // @codeCoverageIgnoreEnd
232
230
}
233
231
234
232
public function stop ()
235
233
{
236
- // @codeCoverageIgnoreStart
237
234
event_base_loopexit ($ this ->base );
238
- // @codeCoverageIgnoreEnd
239
235
}
240
236
}
Original file line number Diff line number Diff line change @@ -156,19 +156,15 @@ public function tick()
156
156
157
157
public function run ()
158
158
{
159
- // @codeCoverageIgnoreStart
160
159
$ this ->running = true ;
161
160
162
161
while ($ this ->tick ()) {
163
162
// NOOP
164
163
}
165
- // @codeCoverageIgnoreEnd
166
164
}
167
165
168
166
public function stop ()
169
167
{
170
- // @codeCoverageIgnoreStart
171
168
$ this ->running = false ;
172
- // @codeCoverageIgnoreEnd
173
169
}
174
170
}
You can’t perform that action at this time.
0 commit comments