@@ -26,8 +26,6 @@ single [`run()`](#run) call that is controlled by the user.
26
26
* [ Loop methods] ( #loop-methods )
27
27
* [ Loop autorun] ( #loop-autorun )
28
28
* [ get()] ( #get )
29
- * [ ~~ Factory~~ ] ( #factory )
30
- * [ ~~ create()~~ ] ( #create )
31
29
* [ Loop implementations] ( #loop-implementations )
32
30
* [ StreamSelectLoop] ( #streamselectloop )
33
31
* [ ExtEventLoop] ( #exteventloop )
@@ -111,7 +109,7 @@ beginning, reuse it throughout your program and finally run it at the end of the
111
109
program like this:
112
110
113
111
``` php
114
- $loop = React\EventLoop\Loop::get(); // or deprecated React\EventLoop\Factory::create();
112
+ $loop = React\EventLoop\Loop::get();
115
113
116
114
$timer = $loop->addPeriodicTimer(0.1, function () {
117
115
echo 'Tick' . PHP_EOL;
@@ -129,9 +127,8 @@ While the former is more concise, the latter is more explicit.
129
127
In both cases, the program would perform the exact same steps.
130
128
131
129
1 . The event loop instance is created at the beginning of the program. This is
132
- implicitly done the first time you call the [ ` Loop ` class] ( #loop ) or
133
- explicitly when using the deprecated [ ` Factory::create() ` method] ( #create )
134
- (or manually instantiating any of the [ loop implementations] ( #loop-implementations ) ).
130
+ implicitly done the first time you call the [ ` Loop ` class] ( #loop )
131
+ (or by manually instantiating any of the [ loop implementations] ( #loop-implementations ) ).
135
132
2 . The event loop is used directly or passed as an instance to library and
136
133
application code. In this example, a periodic timer is registered with the
137
134
event loop which simply outputs ` Tick ` every fraction of a second until another
@@ -305,33 +302,6 @@ $greeter->greet('Bob');
305
302
306
303
See [ ` LoopInterface ` ] ( #loopinterface ) for more details about available methods.
307
304
308
- ### ~~ Factory~~
309
-
310
- > Deprecated since v1.2.0, see [ ` Loop ` class] ( #loop ) instead.
311
-
312
- The deprecated ` Factory ` class exists as a convenient way to pick the best available
313
- [ event loop implementation] ( #loop-implementations ) .
314
-
315
- #### ~~ create()~~
316
-
317
- > Deprecated since v1.2.0, see [ ` Loop::get() ` ] ( #get ) instead.
318
-
319
- The deprecated ` create(): LoopInterface ` method can be used to
320
- create a new event loop instance:
321
-
322
- ``` php
323
- // deprecated
324
- $loop = React\EventLoop\Factory::create();
325
-
326
- // new
327
- $loop = React\EventLoop\Loop::get();
328
- ```
329
-
330
- This method always returns an instance implementing [ ` LoopInterface ` ] ( #loopinterface ) ,
331
- the actual [ event loop implementation] ( #loop-implementations ) is an implementation detail.
332
-
333
- This method should usually only be called once at the beginning of the program.
334
-
335
305
### Loop implementations
336
306
337
307
In addition to the [ ` LoopInterface ` ] ( #loopinterface ) , there are a number of
@@ -363,9 +333,8 @@ function and is the only implementation that works out of the box with PHP.
363
333
This event loop works out of the box on PHP 5.3 through PHP 8+ and HHVM.
364
334
This means that no installation is required and this library works on all
365
335
platforms and supported PHP versions.
366
- Accordingly, the [ ` Loop ` class] ( #loop ) and the deprecated [ ` Factory ` ] ( #factory )
367
- will use this event loop by default if you do not install any of the event loop
368
- extensions listed below.
336
+ Accordingly, the [ ` Loop ` class] ( #loop ) will use this event loop by default if
337
+ you do not install any of the event loop extensions listed below.
369
338
370
339
Under the hood, it does a simple ` select ` system call.
371
340
This system call is limited to the maximum file descriptor number of
0 commit comments