… | |
… | |
51 | |
51 | |
52 | This module implements asynchronous I/O using whatever means your |
52 | This module implements asynchronous I/O using whatever means your |
53 | operating system supports. |
53 | operating system supports. |
54 | |
54 | |
55 | Currently, a number of threads are started that execute your read/writes |
55 | Currently, a number of threads are started that execute your read/writes |
56 | and signal their completion. You don't need thread support in your libc or |
56 | and signal their completion. You don't need thread support in perl, and |
57 | perl, and the threads created by this module will not be visible to the |
57 | the threads created by this module will not be visible to perl. In the |
58 | pthreads library. In the future, this module might make use of the native |
58 | future, this module might make use of the native aio functions available |
59 | aio functions available on many operating systems. However, they are often |
59 | on many operating systems. However, they are often not well-supported |
60 | not well-supported (Linux doesn't allow them on normal files currently, |
60 | (Linux doesn't allow them on normal files currently, for example), |
61 | for example), and they would only support aio_read and aio_write, so the |
61 | and they would only support aio_read and aio_write, so the remaining |
62 | remaining functionality would have to be implemented using threads anyway. |
62 | functionality would have to be implemented using threads anyway. |
63 | |
63 | |
64 | Although the module will work with in the presence of other threads, it is |
64 | Although the module will work with in the presence of other threads, it is |
65 | currently not reentrant, so use appropriate locking yourself, always call |
65 | currently not reentrant, so use appropriate locking yourself, always call |
66 | C<poll_cb> from within the same thread, or never call C<poll_cb> (or other |
66 | C<poll_cb> from within the same thread, or never call C<poll_cb> (or other |
67 | C<aio_> functions) recursively. |
67 | C<aio_> functions) recursively. |