ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.276 by root, Fri Sep 22 05:24:41 2017 UTC vs.
Revision 1.284 by root, Fri Mar 23 01:14:08 2018 UTC

171use common::sense; 171use common::sense;
172 172
173use base 'Exporter'; 173use base 'Exporter';
174 174
175BEGIN { 175BEGIN {
176 our $VERSION = 4.35; 176 our $VERSION = 4.4;
177 177
178 our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close 178 our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close
179 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx 179 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx
180 aio_scandir aio_symlink aio_readlink aio_realpath aio_fcntl aio_ioctl 180 aio_scandir aio_symlink aio_readlink aio_realpath aio_fcntl aio_ioctl
181 aio_sync aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range 181 aio_sync aio_fsync aio_syncfs aio_fdatasync aio_sync_file_range
183 aio_rename aio_rename2 aio_link aio_move aio_copy aio_group 183 aio_rename aio_rename2 aio_link aio_move aio_copy aio_group
184 aio_nop aio_mknod aio_load aio_rmtree aio_mkdir aio_chown 184 aio_nop aio_mknod aio_load aio_rmtree aio_mkdir aio_chown
185 aio_chmod aio_utime aio_truncate 185 aio_chmod aio_utime aio_truncate
186 aio_msync aio_mtouch aio_mlock aio_mlockall 186 aio_msync aio_mtouch aio_mlock aio_mlockall
187 aio_statvfs 187 aio_statvfs
188 aio_slurp
188 aio_wd); 189 aio_wd);
189 190
190 our @EXPORT = (@AIO_REQ, qw(aioreq_pri aioreq_nice)); 191 our @EXPORT = (@AIO_REQ, qw(aioreq_pri aioreq_nice));
191 our @EXPORT_OK = qw(poll_fileno poll_cb poll_wait flush 192 our @EXPORT_OK = qw(poll_fileno poll_cb poll_wait flush
192 min_parallel max_parallel max_idle idle_timeout 193 min_parallel max_parallel max_idle idle_timeout
277 IO::AIO::idle_timeout $seconds 278 IO::AIO::idle_timeout $seconds
278 IO::AIO::max_outstanding $maxreqs 279 IO::AIO::max_outstanding $maxreqs
279 IO::AIO::nreqs 280 IO::AIO::nreqs
280 IO::AIO::nready 281 IO::AIO::nready
281 IO::AIO::npending 282 IO::AIO::npending
283 $nfd = IO::AIO::get_fdlimit [EXPERIMENTAL]
282 IO::AIO::min_fdlimit $nfd; 284 IO::AIO::min_fdlimit $nfd [EXPERIMENTAL]
283 285
284 IO::AIO::sendfile $ofh, $ifh, $offset, $count 286 IO::AIO::sendfile $ofh, $ifh, $offset, $count
285 IO::AIO::fadvise $fh, $offset, $len, $advice 287 IO::AIO::fadvise $fh, $offset, $len, $advice
286 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]] 288 IO::AIO::mmap $scalar, $length, $prot, $flags[, $fh[, $offset]]
287 IO::AIO::munmap $scalar 289 IO::AIO::munmap $scalar
610 namemax => 255, 612 namemax => 255,
611 frsize => 1024, 613 frsize => 1024,
612 fsid => 1810 614 fsid => 1810
613 } 615 }
614 616
615Here is a (likely partial - send me updates!) list of fsid values used by
616Linux - it is safe to hardcode these when C<$^O> is C<linux>:
617
618 0x0000adf5 adfs
619 0x0000adff affs
620 0x5346414f afs
621 0x09041934 anon-inode filesystem
622 0x00000187 autofs
623 0x42465331 befs
624 0x1badface bfs
625 0x42494e4d binfmt_misc
626 0x9123683e btrfs
627 0x0027e0eb cgroupfs
628 0xff534d42 cifs
629 0x73757245 coda
630 0x012ff7b7 coh
631 0x28cd3d45 cramfs
632 0x453dcd28 cramfs-wend (wrong endianness)
633 0x64626720 debugfs
634 0x00001373 devfs
635 0x00001cd1 devpts
636 0x0000f15f ecryptfs
637 0x00414a53 efs
638 0x0000137d ext
639 0x0000ef53 ext2/ext3/ext4
640 0x0000ef51 ext2
641 0xf2f52010 f2fs
642 0x00004006 fat
643 0x65735546 fuseblk
644 0x65735543 fusectl
645 0x0bad1dea futexfs
646 0x01161970 gfs2
647 0x47504653 gpfs
648 0x00004244 hfs
649 0xf995e849 hpfs
650 0x00c0ffee hostfs
651 0x958458f6 hugetlbfs
652 0x2bad1dea inotifyfs
653 0x00009660 isofs
654 0x000072b6 jffs2
655 0x3153464a jfs
656 0x6b414653 k-afs
657 0x0bd00bd0 lustre
658 0x0000137f minix
659 0x0000138f minix 30 char names
660 0x00002468 minix v2
661 0x00002478 minix v2 30 char names
662 0x00004d5a minix v3
663 0x19800202 mqueue
664 0x00004d44 msdos
665 0x0000564c novell
666 0x00006969 nfs
667 0x6e667364 nfsd
668 0x00003434 nilfs
669 0x5346544e ntfs
670 0x00009fa1 openprom
671 0x7461636F ocfs2
672 0x00009fa0 proc
673 0x6165676c pstorefs
674 0x0000002f qnx4
675 0x68191122 qnx6
676 0x858458f6 ramfs
677 0x52654973 reiserfs
678 0x00007275 romfs
679 0x67596969 rpc_pipefs
680 0x73636673 securityfs
681 0xf97cff8c selinux
682 0x0000517b smb
683 0x534f434b sockfs
684 0x73717368 squashfs
685 0x62656572 sysfs
686 0x012ff7b6 sysv2
687 0x012ff7b5 sysv4
688 0x01021994 tmpfs
689 0x15013346 udf
690 0x00011954 ufs
691 0x54190100 ufs byteswapped
692 0x00009fa2 usbdevfs
693 0x01021997 v9fs
694 0xa501fcf5 vxfs
695 0xabba1974 xenfs
696 0x012ff7b4 xenix
697 0x58465342 xfs
698 0x012fd16d xia
699
700=item aio_utime $fh_or_path, $atime, $mtime, $callback->($status) 617=item aio_utime $fh_or_path, $atime, $mtime, $callback->($status)
701 618
702Works like perl's C<utime> function (including the special case of $atime 619Works like perl's C<utime> function (including the special case of $atime
703and $mtime being undef). Fractional times are supported if the underlying 620and $mtime being undef). Fractional times are supported if the underlying
704syscalls support them. 621syscalls support them.
872 789
873=over 4 790=over 4
874 791
875=item IO::AIO::READDIR_DENTS 792=item IO::AIO::READDIR_DENTS
876 793
877When this flag is off, then the callback gets an arrayref consisting of 794Normally the callback gets an arrayref consisting of names only (as
878names only (as with C<aio_readdir>), otherwise it gets an arrayref with 795with C<aio_readdir>). If this flag is set, then the callback gets an
879C<[$name, $type, $inode]> arrayrefs, each describing a single directory 796arrayref with C<[$name, $type, $inode]> arrayrefs, each describing a
880entry in more detail. 797single directory entry in more detail:
881 798
882C<$name> is the name of the entry. 799C<$name> is the name of the entry.
883 800
884C<$type> is one of the C<IO::AIO::DT_xxx> constants: 801C<$type> is one of the C<IO::AIO::DT_xxx> constants:
885 802
886C<IO::AIO::DT_UNKNOWN>, C<IO::AIO::DT_FIFO>, C<IO::AIO::DT_CHR>, C<IO::AIO::DT_DIR>, 803C<IO::AIO::DT_UNKNOWN>, C<IO::AIO::DT_FIFO>, C<IO::AIO::DT_CHR>, C<IO::AIO::DT_DIR>,
887C<IO::AIO::DT_BLK>, C<IO::AIO::DT_REG>, C<IO::AIO::DT_LNK>, C<IO::AIO::DT_SOCK>, 804C<IO::AIO::DT_BLK>, C<IO::AIO::DT_REG>, C<IO::AIO::DT_LNK>, C<IO::AIO::DT_SOCK>,
888C<IO::AIO::DT_WHT>. 805C<IO::AIO::DT_WHT>.
889 806
890C<IO::AIO::DT_UNKNOWN> means just that: readdir does not know. If you need to 807C<IO::AIO::DT_UNKNOWN> means just that: readdir does not know. If you need
891know, you have to run stat yourself. Also, for speed reasons, the C<$type> 808to know, you have to run stat yourself. Also, for speed/memory reasons,
892scalars are read-only: you can not modify them. 809the C<$type> scalars are read-only: you must not modify them.
893 810
894C<$inode> is the inode number (which might not be exact on systems with 64 811C<$inode> is the inode number (which might not be exact on systems with 64
895bit inode numbers and 32 bit perls). This field has unspecified content on 812bit inode numbers and 32 bit perls). This field has unspecified content on
896systems that do not deliver the inode information. 813systems that do not deliver the inode information.
897 814
908short names are tried first. 825short names are tried first.
909 826
910=item IO::AIO::READDIR_STAT_ORDER 827=item IO::AIO::READDIR_STAT_ORDER
911 828
912When this flag is set, then the names will be returned in an order 829When this flag is set, then the names will be returned in an order
913suitable for stat()'ing each one. That is, when you plan to stat() 830suitable for stat()'ing each one. That is, when you plan to stat() most or
914all files in the given directory, then the returned order will likely 831all files in the given directory, then the returned order will likely be
915be fastest. 832faster.
916 833
917If both this flag and C<IO::AIO::READDIR_DIRS_FIRST> are specified, then 834If both this flag and C<IO::AIO::READDIR_DIRS_FIRST> are specified,
918the likely dirs come first, resulting in a less optimal stat order. 835then the likely dirs come first, resulting in a less optimal stat order
836for stat'ing all entries, but likely a more optimal order for finding
837subdirectories.
919 838
920=item IO::AIO::READDIR_FOUND_UNKNOWN 839=item IO::AIO::READDIR_FOUND_UNKNOWN
921 840
922This flag should not be set when calling C<aio_readdirx>. Instead, it 841This flag should not be set when calling C<aio_readdirx>. Instead, it
923is being set by C<aio_readdirx>, when any of the C<$type>'s found were 842is being set by C<aio_readdirx>, when any of the C<$type>'s found were
925C<$type>'s are known, which can be used to speed up some algorithms. 844C<$type>'s are known, which can be used to speed up some algorithms.
926 845
927=back 846=back
928 847
929 848
849=item aio_slurp $pathname, $offset, $length, $data, $callback->($status)
850
851Opens, reads and closes the given file. The data is put into C<$data>,
852which is resized as required.
853
854If C<$offset> is negative, then it is counted from the end of the file.
855
856If C<$length> is zero, then the remaining length of the file is
857used. Also, in this case, the same limitations to modifying C<$data> apply
858as when IO::AIO::mmap is used, i.e. it must only be modified in-place
859with C<substr>. If the size of the file is known, specifying a non-zero
860C<$length> results in a performance advantage.
861
862This request is similar to the older C<aio_load> request, but since it is
863a single request, it might be more efficient to use.
864
865Example: load F</etc/passwd> into C<$passwd>.
866
867 my $passwd;
868 aio_slurp "/etc/passwd", 0, 0, $passwd, sub {
869 $_[0] >= 0
870 or die "/etc/passwd: $!\n";
871
872 printf "/etc/passwd is %d bytes long, and contains:\n", length $passwd;
873 print $passwd;
874 };
875 IO::AIO::flush;
876
877
930=item aio_load $pathname, $data, $callback->($status) 878=item aio_load $pathname, $data, $callback->($status)
931 879
932This is a composite request that tries to fully load the given file into 880This is a composite request that tries to fully load the given file into
933memory. Status is the same as with aio_read. 881memory. Status is the same as with aio_read.
882
883Using C<aio_slurp> might be more efficient, as it is a single request.
934 884
935=cut 885=cut
936 886
937sub aio_load($$;$) { 887sub aio_load($$;$) {
938 my ($path, undef, $cb) = @_; 888 my ($path, undef, $cb) = @_;
1079Scans a directory (similar to C<aio_readdir>) but additionally tries to 1029Scans a directory (similar to C<aio_readdir>) but additionally tries to
1080efficiently separate the entries of directory C<$path> into two sets of 1030efficiently separate the entries of directory C<$path> into two sets of
1081names, directories you can recurse into (directories), and ones you cannot 1031names, directories you can recurse into (directories), and ones you cannot
1082recurse into (everything else, including symlinks to directories). 1032recurse into (everything else, including symlinks to directories).
1083 1033
1084C<aio_scandir> is a composite request that creates of many sub requests_ 1034C<aio_scandir> is a composite request that generates many sub requests.
1085C<$maxreq> specifies the maximum number of outstanding aio requests that 1035C<$maxreq> specifies the maximum number of outstanding aio requests that
1086this function generates. If it is C<< <= 0 >>, then a suitable default 1036this function generates. If it is C<< <= 0 >>, then a suitable default
1087will be chosen (currently 4). 1037will be chosen (currently 4).
1088 1038
1089On error, the callback is called without arguments, otherwise it receives 1039On error, the callback is called without arguments, otherwise it receives
1482C<IO::AIO::FIEMAP_EXTENT_DATA_ENCRYPTED>, C<IO::AIO::FIEMAP_EXTENT_NOT_ALIGNED>, 1432C<IO::AIO::FIEMAP_EXTENT_DATA_ENCRYPTED>, C<IO::AIO::FIEMAP_EXTENT_NOT_ALIGNED>,
1483C<IO::AIO::FIEMAP_EXTENT_DATA_INLINE>, C<IO::AIO::FIEMAP_EXTENT_DATA_TAIL>, 1433C<IO::AIO::FIEMAP_EXTENT_DATA_INLINE>, C<IO::AIO::FIEMAP_EXTENT_DATA_TAIL>,
1484C<IO::AIO::FIEMAP_EXTENT_UNWRITTEN>, C<IO::AIO::FIEMAP_EXTENT_MERGED> or 1434C<IO::AIO::FIEMAP_EXTENT_UNWRITTEN>, C<IO::AIO::FIEMAP_EXTENT_MERGED> or
1485C<IO::AIO::FIEMAP_EXTENT_SHARED>. 1435C<IO::AIO::FIEMAP_EXTENT_SHARED>.
1486 1436
1487At the time of this writing (Linux 3.2), this requets is unreliable unless 1437At the time of this writing (Linux 3.2), this request is unreliable unless
1488C<$count> is C<undef>, as the kernel has all sorts of bugs preventing 1438C<$count> is C<undef>, as the kernel has all sorts of bugs preventing
1489it to return all extents of a range for files with large number of 1439it to return all extents of a range for files with a large number of
1490extents. The code works around all these issues if C<$count> is undef. 1440extents. The code (only) works around all these issues if C<$count> is
1441C<undef>.
1491 1442
1492=item aio_group $callback->(...) 1443=item aio_group $callback->(...)
1493 1444
1494This is a very special aio request: Instead of doing something, it is a 1445This is a very special aio request: Instead of doing something, it is a
1495container for other aio requests, which is useful if you want to bundle 1446container for other aio requests, which is useful if you want to bundle
1608There are some caveats: when directories get renamed (or deleted), the 1559There are some caveats: when directories get renamed (or deleted), the
1609pathname string doesn't change, so will point to the new directory (or 1560pathname string doesn't change, so will point to the new directory (or
1610nowhere at all), while the directory fd, if available on the system, 1561nowhere at all), while the directory fd, if available on the system,
1611will still point to the original directory. Most functions accepting a 1562will still point to the original directory. Most functions accepting a
1612pathname will use the directory fd on newer systems, and the string on 1563pathname will use the directory fd on newer systems, and the string on
1613older systems. Some functions (such as realpath) will always rely on the 1564older systems. Some functions (such as C<aio_realpath>) will always rely on
1614string form of the pathname. 1565the string form of the pathname.
1615 1566
1616So this functionality is mainly useful to get some protection against 1567So this functionality is mainly useful to get some protection against
1617C<chdir>, to easily get an absolute path out of a relative path for future 1568C<chdir>, to easily get an absolute path out of a relative path for future
1618reference, and to speed up doing many operations in the same directory 1569reference, and to speed up doing many operations in the same directory
1619(e.g. when stat'ing all files in a directory). 1570(e.g. when stat'ing all files in a directory).
2069 2020
2070=over 4 2021=over 4
2071 2022
2072=item $numfd = IO::AIO::get_fdlimit 2023=item $numfd = IO::AIO::get_fdlimit
2073 2024
2025This function is I<EXPERIMENTAL> and subject to change.
2026
2074Tries to find the current file descriptor limit and returns it, or 2027Tries to find the current file descriptor limit and returns it, or
2075C<undef> and sets C<$!> in case of an error. The limit is one larger than 2028C<undef> and sets C<$!> in case of an error. The limit is one larger than
2076the highest valid file descriptor number. 2029the highest valid file descriptor number.
2077 2030
2078=item IO::AIO::min_fdlimit [$numfd] 2031=item IO::AIO::min_fdlimit [$numfd]
2032
2033This function is I<EXPERIMENTAL> and subject to change.
2079 2034
2080Try to increase the current file descriptor limit(s) to at least C<$numfd> 2035Try to increase the current file descriptor limit(s) to at least C<$numfd>
2081by changing the soft or hard file descriptor resource limit. If C<$numfd> 2036by changing the soft or hard file descriptor resource limit. If C<$numfd>
2082is missing, it will try to set a very high limit, although this is not 2037is missing, it will try to set a very high limit, although this is not
2083recommended when you know the actual minimum that you require. 2038recommended when you know the actual minimum that you require.
2262 2217
2263Please refer to L<pipe2(2)> for more info on the C<$flags>, but at the 2218Please refer to L<pipe2(2)> for more info on the C<$flags>, but at the
2264time of this writing, C<IO::AIO::O_CLOEXEC>, C<IO::AIO::O_NONBLOCK> and 2219time of this writing, C<IO::AIO::O_CLOEXEC>, C<IO::AIO::O_NONBLOCK> and
2265C<IO::AIO::O_DIRECT> (Linux 3.4, for packet-based pipes) were supported. 2220C<IO::AIO::O_DIRECT> (Linux 3.4, for packet-based pipes) were supported.
2266 2221
2222Example: create a pipe race-free w.r.t. threads and fork:
2223
2224 my ($rfh, $wfh) = IO::AIO::pipe2 IO::AIO::O_CLOEXEC
2225 or die "pipe2: $!\n";
2226
2227=item $fh = IO::AIO::eventfd [$initval, [$flags]]
2228
2229This is a direct interface to the Linux L<eventfd(2)> system call. The
2230(unhelpful) defaults for C<$initval> and C<$flags> are C<0> for both.
2231
2232On success, the new eventfd filehandle is returned, otherwise returns
2233C<undef>. If the eventfd syscall is missing, fails with C<ENOSYS>.
2234
2235Please refer to L<eventfd(2)> for more info on this call.
2236
2237The following symbol flag values are available: C<IO::AIO::EFD_CLOEXEC>,
2238C<IO::AIO::EFD_NONBLOCK> and C<IO::AIO::EFD_SEMAPHORE> (Linux 2.6.30).
2239
2240Example: create a new eventfd filehandle:
2241
2242 $fh = IO::AIO::eventfd 0, IO::AIO::O_CLOEXEC
2243 or die "eventfd: $!\n";
2244
2245=item $fh = IO::AIO::timerfd_create $clockid[, $flags]
2246
2247This is a direct interface to the Linux L<timerfd_create(2)> system call. The
2248(unhelpful) default for C<$flags> is C<0>.
2249
2250On success, the new timerfd filehandle is returned, otherwise returns
2251C<undef>. If the eventfd syscall is missing, fails with C<ENOSYS>.
2252
2253Please refer to L<timerfd_create(2)> for more info on this call.
2254
2255The following C<$clockid> values are
2256available: C<IO::AIO::CLOCK_REALTIME>, C<IO::AIO::CLOCK_MONOTONIC>
2257C<IO::AIO::CLOCK_CLOCK_BOOTTIME> (Linux 3.15)
2258C<IO::AIO::CLOCK_CLOCK_REALTIME_ALARM> (Linux 3.11) and
2259C<IO::AIO::CLOCK_CLOCK_BOOTTIME_ALARM> (Linux 3.11).
2260
2261The following C<$flags> values are available (Linux
22622.6.27): C<IO::AIO::TFD_NONBLOCK> and C<IO::AIO::TFD_CLOEXEC>.
2263
2264Example: create a new timerfd and set it to one-second repeated alarms,
2265then wait for two alarms:
2266
2267 my $fh = IO::AIO::timerfd_create IO::AIO::CLOCK_BOOTTIME, IO::AIO::TFD_CLOEXEC
2268 or die "timerfd_create: $!\n";
2269
2270 defined IO::AIO::timerfd_settime $fh, 0, 1, 1
2271 or die "timerfd_settime: $!\n";
2272
2273 for (1..2) {
2274 8 == sysread $fh, my $buf, 8
2275 or die "timerfd read failure\n";
2276
2277 printf "number of expirations (likely 1): %d\n",
2278 unpack "Q", $buf;
2279 }
2280
2281=item ($cur_interval, $cur_value) = IO::AIO::timerfd_settime $fh, $flags, $new_interval, $nbw_value
2282
2283This is a direct interface to the Linux L<timerfd_settime(2)> system
2284call. Please refer to its manpage for more info on this call.
2285
2286The new itimerspec is specified using two (possibly fractional) second
2287values, C<$new_interval> and C<$new_value>).
2288
2289On success, the current interval and value are returned (as per
2290C<timerfd_gettime>). On failure, the empty list is returned.
2291
2292The following C<$flags> values are
2293available: C<IO::AIO::TFD_TIMER_ABSTIME> and
2294C<IO::AIO::TFD_TIMER_CANCEL_ON_SET>.
2295
2296See C<IO::AIO::timerfd_create> for a full example.
2297
2298=item ($cur_interval, $cur_value) = IO::AIO::timerfd_gettime $fh
2299
2300This is a direct interface to the Linux L<timerfd_gettime(2)> system
2301call. Please refer to its manpage for more info on this call.
2302
2303On success, returns the current values of interval and value for the given
2304timerfd (as potentially fractional second values). On failure, the empty
2305list is returned.
2306
2267=back 2307=back
2268 2308
2269=cut 2309=cut
2270 2310
2271min_parallel 8; 2311min_parallel 8;
2336the process will result in undefined behaviour. Calling it at any time 2376the process will result in undefined behaviour. Calling it at any time
2337will also result in any undefined (by POSIX) behaviour. 2377will also result in any undefined (by POSIX) behaviour.
2338 2378
2339=back 2379=back
2340 2380
2381=head2 LINUX-SPECIFIC CALLS
2382
2383When a call is documented as "linux-specific" then this means it
2384originated on GNU/Linux. C<IO::AIO> will usually try to autodetect the
2385availability and compatibility of such calls regardless of the platform
2386it is compiled on, so platforms such as FreeBSD which often implement
2387these calls will work. When in doubt, call them and see if they fail wth
2388C<ENOSYS>.
2389
2341=head2 MEMORY USAGE 2390=head2 MEMORY USAGE
2342 2391
2343Per-request usage: 2392Per-request usage:
2344 2393
2345Each aio request uses - depending on your architecture - around 100-200 2394Each aio request uses - depending on your architecture - around 100-200
2357temporary buffers, and each thread requires a stack and other data 2406temporary buffers, and each thread requires a stack and other data
2358structures (usually around 16k-128k, depending on the OS). 2407structures (usually around 16k-128k, depending on the OS).
2359 2408
2360=head1 KNOWN BUGS 2409=head1 KNOWN BUGS
2361 2410
2362Known bugs will be fixed in the next release. 2411Known bugs will be fixed in the next release :)
2412
2413=head1 KNOWN ISSUES
2414
2415Calls that try to "import" foreign memory areas (such as C<IO::AIO::mmap>
2416or C<IO::AIO::aio_slurp>) do not work with generic lvalues, such as
2417non-created hash slots or other scalars I didn't think of. It's best to
2418avoid such and either use scalar variables or making sure that the scalar
2419exists (e.g. by storing C<undef>) and isn't "funny" (e.g. tied).
2420
2421I am not sure anything can be done about this, so this is considered a
2422known issue, rather than a bug.
2363 2423
2364=head1 SEE ALSO 2424=head1 SEE ALSO
2365 2425
2366L<AnyEvent::AIO> for easy integration into event loops, L<Coro::AIO> for a 2426L<AnyEvent::AIO> for easy integration into event loops, L<Coro::AIO> for a
2367more natural syntax. 2427more natural syntax.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines