@@ -158,8 +158,31 @@ A `stream_select()` based event loop.
158158
159159This uses the [ ` stream_select() ` ] ( http://php.net/manual/en/function.stream-select.php )
160160function and is the only implementation which works out of the box with PHP.
161- It does a simple ` select ` system call.
162- It's not the most performant of loops, but still does the job quite well.
161+
162+ This event loop works out of the box on PHP 5.4 through PHP 7+ and HHVM.
163+ This means that no installation is required and this library works on all
164+ platforms and supported PHP versions.
165+ Accordingly, the [ ` Factory ` ] ( #factory ) will use this event loop by default if
166+ you do not install any of the event loop extensions listed below.
167+
168+ Under the hood, it does a simple ` select ` system call.
169+ This system call is limited to the maximum file descriptor number of
170+ ` FD_SETSIZE ` (platform dependent, commonly 1024) and scales with ` O(m) `
171+ (` m ` being the maximum file descriptor number passed).
172+ This means that you may run into issues when handling thousands of streams
173+ concurrently and you may want to look into using one of the alternative
174+ event loop implementations listed below in this case.
175+ If your use case is among the many common use cases that involve handling only
176+ dozens or a few hundred streams at once, then this event loop implementation
177+ performs really well.
178+
179+ If you want to use signal handling (see also [ ` addSignal() ` ] ( #addsignal ) below),
180+ this event loop implementation requires ` ext-pcntl ` .
181+ This extension is only available for Unix-like platforms and does not support
182+ Windows.
183+ It is commonly installed as part of many PHP distributions.
184+ If this extension is missing (or you're running on Windows), signal handling is
185+ not supported and throws a ` BadMethodCallException ` instead.
163186
164187#### LibEventLoop
165188
@@ -168,20 +191,33 @@ An `ext-libevent` based event loop.
168191This uses the [ ` libevent ` PECL extension] ( https://pecl.php.net/package/libevent ) .
169192` libevent ` itself supports a number of system-specific backends (epoll, kqueue).
170193
194+ This event loop does only work with PHP 5.
195+ An [ unofficial update] ( https://github.com/php/pecl-event-libevent/pull/2 ) for
196+ PHP 7 does exist, but it is known to cause regular crashes due to ` SEGFAULT ` s.
197+ To reiterate: Using this event loop on PHP 7 is not recommended.
198+ Accordingly, the [ ` Factory ` ] ( #factory ) will not try to use this event loop on
199+ PHP 7.
200+
171201#### LibEvLoop
172202
173203An ` ext-libev ` based event loop.
174204
175205This uses an [ unofficial ` libev ` extension] ( https://github.com/m4rw3r/php-libev ) .
176206It supports the same backends as libevent.
177207
208+ This loop does only work with PHP 5.
209+ An update for PHP 7 is [ unlikely] ( https://github.com/m4rw3r/php-libev/issues/8 )
210+ to happen any time soon.
211+
178212#### ExtEventLoop
179213
180214An ` ext-event ` based event loop.
181215
182216This uses the [ ` event ` PECL extension] ( https://pecl.php.net/package/event ) .
183217It supports the same backends as libevent.
184218
219+ This loop is known to work with PHP 5.4 through PHP 7+.
220+
185221### LoopInterface
186222
187223#### addTimer()
0 commit comments