[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: No os.copy or lfs.copy?
- From: Michal Kolodziejczyk <miko@...>
- Date: Tue, 08 Apr 2008 11:07:07 +0200
gary ng wrote:
How would coroutine help in this file copy case,
assuming we are using the stock lua file io library
which is not async capable ?
You could read large file in smaller blocks while at the same time do
something else (if you need to). So use file:read(buffersize) with
buffersize that matches your hardware best.