Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!philmtl!altitude!martint From: martint@altitude.CAM.ORG (Martin Taillefer) Newsgroups: comp.sys.amiga.tech Subject: Re: Async AmigaDOS I/O using locks and packets? Message-ID: <1990Apr13.224913.17590@altitude.CAM.ORG> Date: 13 Apr 90 22:49:13 GMT References: Distribution: comp Organization: None Lines: 25 In article deven@rpi.edu (Deven T. Corzine) writes: >It also says that locks can also be used for asynchronous I/O, but >does not describe HOW. Can you Lock() a file and use packets to the >filesystem handler to do asynchronous I/O to AmigaDOS files without >even having to call Open()? If so, how do you do this? There's no way as of 1.3 to flip flop from a file handle to a file lock and back from the perspective of the user of a handler. The best way to do async file system IO is to first open the file using the normal Open() call, then use the data contained in the FileHandle to communicate with the file system directly. When you're done, you can then use the normal Close() to terminate access to the file. I do this all the time and it works great. I first implemented this scheme in the M2Sprint compiler. While the compiler is busy compiling a section of code, an asynchronous file system request is busy loading the next section of code in memory. This really increases performance quite a bit with DMA devices. -- ---------------------------------------- Martin Taillefer INTERNET: martin@pnt.CAM.ORG UUCP: uunet!philmtl!altitude!martint TEL: 514/640-5734 BIX: vertex