… | |
… | |
305 | |
305 | |
306 | This function can be used to "simulate" a signal receive. It is completely |
306 | This function can be used to "simulate" a signal receive. It is completely |
307 | safe to call this function at any time, from any context, including signal |
307 | safe to call this function at any time, from any context, including signal |
308 | handlers or random threads. |
308 | handlers or random threads. |
309 | |
309 | |
310 | It's main use is to customise signal handling in your process, especially |
310 | Its main use is to customise signal handling in your process, especially |
311 | in the presence of threads. For example, you could block signals |
311 | in the presence of threads. For example, you could block signals |
312 | by default in all threads (and specifying C<EVFLAG_NOSIGMASK> when |
312 | by default in all threads (and specifying C<EVFLAG_NOSIGMASK> when |
313 | creating any loops), and in one thread, use C<sigwait> or any other |
313 | creating any loops), and in one thread, use C<sigwait> or any other |
314 | mechanism to wait for signals, then "deliver" them to libev by calling |
314 | mechanism to wait for signals, then "deliver" them to libev by calling |
315 | C<ev_feed_signal>. |
315 | C<ev_feed_signal>. |