Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Asynchronous File I/O on Linux



On May 16, 2010, at 10:06 AM, Mark Woodward wrote:
> 
> Well, it is "async" in the view that I want to issue multiple read 
> requests simultaneously from the same execution context (thread or 
> process). What I want to test is *if* I can issue multiple read requests 

That's definitely not asynchronous I/O.  Asynchronous means that the calling process doesn't wait for the write call to finish.  That is, the process runs asynchronously to the write.  Reads are always synchronous.

What you described is either concurrent or parallel (I'm not precisely sure which term is most appropriate) reads.  Can you do it?  Sure, just as I described: create as many file handles to the file that you need with open().  Each file handle has its own unique read/write pointer to the file.

--Rich P.








BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org