… | |
… | |
894 | =item C<EV_ERROR> |
894 | =item C<EV_ERROR> |
895 | |
895 | |
896 | An unspecified error has occurred, the watcher has been stopped. This might |
896 | An unspecified error has occurred, the watcher has been stopped. This might |
897 | happen because the watcher could not be properly started because libev |
897 | happen because the watcher could not be properly started because libev |
898 | ran out of memory, a file descriptor was found to be closed or any other |
898 | ran out of memory, a file descriptor was found to be closed or any other |
|
|
899 | problem. Libev considers these application bugs. |
|
|
900 | |
899 | problem. You best act on it by reporting the problem and somehow coping |
901 | You best act on it by reporting the problem and somehow coping with the |
900 | with the watcher being stopped. |
902 | watcher being stopped. Note that well-written programs should not receive |
|
|
903 | an error ever, so when your watcher receives it, this usually indicates a |
|
|
904 | bug in your program. |
901 | |
905 | |
902 | Libev will usually signal a few "dummy" events together with an error, for |
906 | Libev will usually signal a few "dummy" events together with an error, for |
903 | example it might indicate that a fd is readable or writable, and if your |
907 | example it might indicate that a fd is readable or writable, and if your |
904 | callbacks is well-written it can just attempt the operation and cope with |
908 | callbacks is well-written it can just attempt the operation and cope with |
905 | the error from read() or write(). This will not work in multi-threaded |
909 | the error from read() or write(). This will not work in multi-threaded |