ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Async-Interrupt/Interrupt.pm
(Generate patch)

Comparing cvsroot/Async-Interrupt/Interrupt.pm (file contents):
Revision 1.20 by root, Tue Jul 28 13:35:57 2009 UTC vs.
Revision 1.22 by root, Wed Aug 5 11:51:53 2009 UTC

236 # the next line forces initialisation of internal 236 # the next line forces initialisation of internal
237 # signal handling variables, otherwise, PL_sig_pending 237 # signal handling variables, otherwise, PL_sig_pending
238 # etc. will be null pointers. 238 # etc. will be null pointers.
239 $SIG{KILL} = sub { }; 239 $SIG{KILL} = sub { };
240 240
241 our $VERSION = '1.0'; 241 our $VERSION = '1.01';
242 242
243 require XSLoader; 243 require XSLoader;
244 XSLoader::load ("Async::Interrupt", $VERSION); 244 XSLoader::load ("Async::Interrupt", $VERSION);
245} 245}
246 246
576 576
577=item $epipe->drain 577=item $epipe->drain
578 578
579Drain (empty) the pipe. 579Drain (empty) the pipe.
580 580
581=item ($c_func, $c_arg) = $epipe->drain_func
582
583Returns a function pointer and C<void *> argument that can be called to
584have the effect of C<< $epipe->drain >> on the XS level.
585
586It has the following prototype and needs to be passed the specified
587C<$c_arg>, which is a C<void *> cast to C<IV>:
588
589 void (*c_func) (void *c_arg)
590
591An example call would look like:
592
593 c_func (c_arg);
594
581=item $epipe->renew 595=item $epipe->renew
582 596
583Recreates the pipe (useful after a fork). The reading side will not change 597Recreates the pipe (useful after a fork). The reading side will not change
584it's file descriptor number, but the writing side might. 598it's file descriptor number, but the writing side might.
585 599
600=item $epipe->wait
601
602This method blocks the process until there are events on the pipe. This is
603not a very event-based or ncie way of usign an event pipe, but it can be
604occasionally useful.
605
586=back 606=back
587 607
588=cut 608=cut
589 609
5901; 6101;
591
592=head1 EXAMPLE
593
594There really should be a complete C/XS example. Bug me about it. Better
595yet, create one.
596 611
597=head1 IMPLEMENTATION DETAILS AND LIMITATIONS 612=head1 IMPLEMENTATION DETAILS AND LIMITATIONS
598 613
599This module works by "hijacking" SIGKILL, which is guaranteed to always 614This module works by "hijacking" SIGKILL, which is guaranteed to always
600exist, but also cannot be caught, so is always available. 615exist, but also cannot be caught, so is always available.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines