--- Async-Interrupt/Interrupt.pm 2009/07/28 13:35:57 1.20 +++ Async-Interrupt/Interrupt.pm 2009/07/30 03:59:47 1.21 @@ -578,22 +578,37 @@ Drain (empty) the pipe. +=item ($c_func, $c_arg) = $epipe->drain_func + +Returns a function pointer and C argument that can be called to +have the effect of C<< $epipe->drain >> on the XS level. + +It has the following prototype and needs to be passed the specified +C<$c_arg>, which is a C cast to C: + + void (*c_func) (void *c_arg) + +An example call would look like: + + c_func (c_arg); + =item $epipe->renew Recreates the pipe (useful after a fork). The reading side will not change it's file descriptor number, but the writing side might. +=item $epipe->wait + +This method blocks the process until there are events on the pipe. This is +not a very event-based or ncie way of usign an event pipe, but it can be +occasionally useful. + =back =cut 1; -=head1 EXAMPLE - -There really should be a complete C/XS example. Bug me about it. Better -yet, create one. - =head1 IMPLEMENTATION DETAILS AND LIMITATIONS This module works by "hijacking" SIGKILL, which is guaranteed to always