… | |
… | |
92 | file descriptor C<$fh_or_fd>. |
92 | file descriptor C<$fh_or_fd>. |
93 | |
93 | |
94 | The callback C<$cb> is invoked as soon and as long as I/O of the type |
94 | The callback C<$cb> is invoked as soon and as long as I/O of the type |
95 | specified by C<$watch_write>) can be done on the file handle/descriptor. |
95 | specified by C<$watch_write>) can be done on the file handle/descriptor. |
96 | |
96 | |
97 | IF you want a mnemomic for the second argument: C<0> is standard I<input>, |
97 | If you want a mnemomic for the second argument: C<0> is standard I<input>, |
98 | for I<reading>, and C<1> is standard I<output>, for I<writing>. |
98 | for I<reading>, and C<1> is standard I<output>, for I<writing>. |
99 | |
99 | |
100 | Example: wait until STDIN becomes readable. |
100 | Example: wait until STDIN becomes readable. |
101 | |
101 | |
102 | $stdin_ready = AE::io *STDIN, 0, sub { scalar <STDIN> }; |
102 | $stdin_ready = AE::io *STDIN, 0, sub { scalar <STDIN> }; |