Re: aio_read/write versus O_NONBLOCK
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Wed, 14 May 2008 00:13:59 -0400
In article
<fe463120-697d-4100-9ca8-b74083491664@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
RazvanD <razvand@xxxxxxxxx> wrote:
Hi!
Could someone point me to some articles or give me some hints on the
advantages/disadvantages of asynchronous operations on files (aio_read/
aio_read) versus normal operations (read/write) used with O_NONBLOCK
when opening a file.
aio_read/aio_write are indeed more flexible. But, at least on Linux/
glibc, they are implemented using POSIX threads. Wouldn't a carefully
designed program using O_NONBLOCK for files best a program using
aio_read/aio_write? I think my question should be: are asynchronous I/
O operations only more flexible or are they also faster?
I'm not certain about Linux, but on many systems O_NONBLOCK has no
effect on ordinary file streams.
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- Follow-Ups:
- Re: aio_read/write versus O_NONBLOCK
- From: phil-news-nospam
- Re: aio_read/write versus O_NONBLOCK
- References:
- aio_read/write versus O_NONBLOCK
- From: RazvanD
- aio_read/write versus O_NONBLOCK
- Prev by Date: Re: Address of function from shared library
- Next by Date: Re: Stdout initialisation
- Previous by thread: Re: aio_read/write versus O_NONBLOCK
- Next by thread: Re: aio_read/write versus O_NONBLOCK
- Index(es):