… | |
… | |
1600 | semantics of C<ev_stat> watchers, which means that libev sometimes needs |
1600 | semantics of C<ev_stat> watchers, which means that libev sometimes needs |
1601 | to fall back to regular polling again even with inotify, but changes are |
1601 | to fall back to regular polling again even with inotify, but changes are |
1602 | usually detected immediately, and if the file exists there will be no |
1602 | usually detected immediately, and if the file exists there will be no |
1603 | polling. |
1603 | polling. |
1604 | |
1604 | |
|
|
1605 | =head3 ABI Issues (Largefile Support) |
|
|
1606 | |
|
|
1607 | Libev by default (unless the user overrides this) uses the default |
|
|
1608 | compilation environment, which means that on systems with optionally |
|
|
1609 | disabled large file support, you get the 32 bit version of the stat |
|
|
1610 | structure. When using the library from programs that change the ABI to |
|
|
1611 | use 64 bit file offsets the programs will fail. In that case you have to |
|
|
1612 | compile libev with the same flags to get binary compatibility. This is |
|
|
1613 | obviously the case with any flags that change the ABI, but the problem is |
|
|
1614 | most noticably with ev_stat and largefile support. |
|
|
1615 | |
1605 | =head3 Inotify |
1616 | =head3 Inotify |
1606 | |
1617 | |
1607 | When C<inotify (7)> support has been compiled into libev (generally only |
1618 | When C<inotify (7)> support has been compiled into libev (generally only |
1608 | available on Linux) and present at runtime, it will be used to speed up |
1619 | available on Linux) and present at runtime, it will be used to speed up |
1609 | change detection where possible. The inotify descriptor will be created lazily |
1620 | change detection where possible. The inotify descriptor will be created lazily |
… | |
… | |
2509 | io.start (fd, ev::READ); |
2520 | io.start (fd, ev::READ); |
2510 | } |
2521 | } |
2511 | }; |
2522 | }; |
2512 | |
2523 | |
2513 | |
2524 | |
|
|
2525 | =head1 OTHER LANGUAGE BINDINGS |
|
|
2526 | |
|
|
2527 | Libev does not offer other language bindings itself, but bindings for a |
|
|
2528 | numbe rof languages exist in the form of third-party packages. If you know |
|
|
2529 | any interesting language binding in addition to the ones listed here, drop |
|
|
2530 | me a note. |
|
|
2531 | |
|
|
2532 | =over 4 |
|
|
2533 | |
|
|
2534 | =item Perl |
|
|
2535 | |
|
|
2536 | The EV module implements the full libev API and is actually used to test |
|
|
2537 | libev. EV is developed together with libev. Apart from the EV core module, |
|
|
2538 | there are additional modules that implement libev-compatible interfaces |
|
|
2539 | to C<libadns> (C<EV::ADNS>), C<Net::SNMP> (C<Net::SNMP::EV>) and the |
|
|
2540 | C<libglib> event core (C<Glib::EV> and C<EV::Glib>). |
|
|
2541 | |
|
|
2542 | It can be found and installed via CPAN, its homepage is found at |
|
|
2543 | L<http://software.schmorp.de/pkg/EV>. |
|
|
2544 | |
|
|
2545 | =item Ruby |
|
|
2546 | |
|
|
2547 | Tony Arcieri has written a ruby extension that offers access to a subset |
|
|
2548 | of the libev API and adds filehandle abstractions, asynchronous DNS and |
|
|
2549 | more on top of it. It can be found via gem servers. Its homepage is at |
|
|
2550 | L<http://rev.rubyforge.org/>. |
|
|
2551 | |
|
|
2552 | =item D |
|
|
2553 | |
|
|
2554 | Leandro Lucarella has written a D language binding (F<ev.d>) for libev, to |
|
|
2555 | be found at L<http://git.llucax.com.ar/?p=software/ev.d.git;a=summary>. |
|
|
2556 | |
|
|
2557 | =back |
|
|
2558 | |
|
|
2559 | |
2514 | =head1 MACRO MAGIC |
2560 | =head1 MACRO MAGIC |
2515 | |
2561 | |
2516 | Libev can be compiled with a variety of options, the most fundamantal |
2562 | Libev can be compiled with a variety of options, the most fundamantal |
2517 | of which is C<EV_MULTIPLICITY>. This option determines whether (most) |
2563 | of which is C<EV_MULTIPLICITY>. This option determines whether (most) |
2518 | functions and callbacks have an initial C<struct ev_loop *> argument. |
2564 | functions and callbacks have an initial C<struct ev_loop *> argument. |