… | |
… | |
403 | While this backend scales well, it requires one system call per active |
403 | While this backend scales well, it requires one system call per active |
404 | file descriptor per loop iteration. For small and medium numbers of file |
404 | file descriptor per loop iteration. For small and medium numbers of file |
405 | descriptors a "slow" C<EVBACKEND_SELECT> or C<EVBACKEND_POLL> backend |
405 | descriptors a "slow" C<EVBACKEND_SELECT> or C<EVBACKEND_POLL> backend |
406 | might perform better. |
406 | might perform better. |
407 | |
407 | |
|
|
408 | On the positive side, ignoring the spurious readyness notifications, this |
|
|
409 | backend actually performed to specification in all tests and is fully |
|
|
410 | embeddable, which is a rare feat among the OS-specific backends. |
|
|
411 | |
408 | =item C<EVBACKEND_ALL> |
412 | =item C<EVBACKEND_ALL> |
409 | |
413 | |
410 | Try all backends (even potentially broken ones that wouldn't be tried |
414 | Try all backends (even potentially broken ones that wouldn't be tried |
411 | with C<EVFLAG_AUTO>). Since this is a mask, you can do stuff such as |
415 | with C<EVFLAG_AUTO>). Since this is a mask, you can do stuff such as |
412 | C<EVBACKEND_ALL & ~EVBACKEND_KQUEUE>. |
416 | C<EVBACKEND_ALL & ~EVBACKEND_KQUEUE>. |
… | |
… | |
414 | It is definitely not recommended to use this flag. |
418 | It is definitely not recommended to use this flag. |
415 | |
419 | |
416 | =back |
420 | =back |
417 | |
421 | |
418 | If one or more of these are ored into the flags value, then only these |
422 | If one or more of these are ored into the flags value, then only these |
419 | backends will be tried (in the reverse order as given here). If none are |
423 | backends will be tried (in the reverse order as listed here). If none are |
420 | specified, most compiled-in backend will be tried, usually in reverse |
424 | specified, all backends in C<ev_recommended_backends ()> will be tried. |
421 | order of their flag values :) |
|
|
422 | |
425 | |
423 | The most typical usage is like this: |
426 | The most typical usage is like this: |
424 | |
427 | |
425 | if (!ev_default_loop (0)) |
428 | if (!ev_default_loop (0)) |
426 | fatal ("could not initialise libev, bad $LIBEV_FLAGS in environment?"); |
429 | fatal ("could not initialise libev, bad $LIBEV_FLAGS in environment?"); |