|
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.
Regards, miko