… | |
… | |
94 | |
94 | |
95 | # file contents now in $contents |
95 | # file contents now in $contents |
96 | print $contents; |
96 | print $contents; |
97 | |
97 | |
98 | # exit event loop and program |
98 | # exit event loop and program |
99 | EV::unloop; |
99 | EV::break; |
100 | }; |
100 | }; |
101 | }; |
101 | }; |
102 | |
102 | |
103 | # possibly queue up other requests, or open GUI windows, |
103 | # possibly queue up other requests, or open GUI windows, |
104 | # check for sockets etc. etc. |
104 | # check for sockets etc. etc. |
105 | |
105 | |
106 | # process events as long as there are some: |
106 | # process events as long as there are some: |
107 | EV::loop; |
107 | EV::run; |
108 | |
108 | |
109 | =head1 REQUEST ANATOMY AND LIFETIME |
109 | =head1 REQUEST ANATOMY AND LIFETIME |
110 | |
110 | |
111 | Every C<aio_*> function creates a request. which is a C data structure not |
111 | Every C<aio_*> function creates a request. which is a C data structure not |
112 | directly visible to Perl. |
112 | directly visible to Perl. |
… | |
… | |
167 | use common::sense; |
167 | use common::sense; |
168 | |
168 | |
169 | use base 'Exporter'; |
169 | use base 'Exporter'; |
170 | |
170 | |
171 | BEGIN { |
171 | BEGIN { |
172 | our $VERSION = 4.32; |
172 | our $VERSION = 4.33; |
173 | |
173 | |
174 | our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close |
174 | our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close |
175 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx |
175 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx |
176 | aio_scandir aio_symlink aio_readlink aio_realpath aio_sync |
176 | aio_scandir aio_symlink aio_readlink aio_realpath aio_sync |
177 | aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range aio_allocate |
177 | aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range aio_allocate |
… | |
… | |
626 | 0x00001373 devfs |
626 | 0x00001373 devfs |
627 | 0x00001cd1 devpts |
627 | 0x00001cd1 devpts |
628 | 0x0000f15f ecryptfs |
628 | 0x0000f15f ecryptfs |
629 | 0x00414a53 efs |
629 | 0x00414a53 efs |
630 | 0x0000137d ext |
630 | 0x0000137d ext |
631 | 0x0000ef53 ext2/ext3 |
631 | 0x0000ef53 ext2/ext3/ext4 |
632 | 0x0000ef51 ext2 |
632 | 0x0000ef51 ext2 |
|
|
633 | 0xf2f52010 f2fs |
633 | 0x00004006 fat |
634 | 0x00004006 fat |
634 | 0x65735546 fuseblk |
635 | 0x65735546 fuseblk |
635 | 0x65735543 fusectl |
636 | 0x65735543 fusectl |
636 | 0x0bad1dea futexfs |
637 | 0x0bad1dea futexfs |
637 | 0x01161970 gfs2 |
638 | 0x01161970 gfs2 |
638 | 0x47504653 gpfs |
639 | 0x47504653 gpfs |
639 | 0x00004244 hfs |
640 | 0x00004244 hfs |
640 | 0xf995e849 hpfs |
641 | 0xf995e849 hpfs |
|
|
642 | 0x00c0ffee hostfs |
641 | 0x958458f6 hugetlbfs |
643 | 0x958458f6 hugetlbfs |
642 | 0x2bad1dea inotifyfs |
644 | 0x2bad1dea inotifyfs |
643 | 0x00009660 isofs |
645 | 0x00009660 isofs |
644 | 0x000072b6 jffs2 |
646 | 0x000072b6 jffs2 |
645 | 0x3153464a jfs |
647 | 0x3153464a jfs |
… | |
… | |
660 | 0x00009fa1 openprom |
662 | 0x00009fa1 openprom |
661 | 0x7461636F ocfs2 |
663 | 0x7461636F ocfs2 |
662 | 0x00009fa0 proc |
664 | 0x00009fa0 proc |
663 | 0x6165676c pstorefs |
665 | 0x6165676c pstorefs |
664 | 0x0000002f qnx4 |
666 | 0x0000002f qnx4 |
|
|
667 | 0x68191122 qnx6 |
665 | 0x858458f6 ramfs |
668 | 0x858458f6 ramfs |
666 | 0x52654973 reiserfs |
669 | 0x52654973 reiserfs |
667 | 0x00007275 romfs |
670 | 0x00007275 romfs |
668 | 0x67596969 rpc_pipefs |
671 | 0x67596969 rpc_pipefs |
669 | 0x73636673 securityfs |
672 | 0x73636673 securityfs |