lua-users home
lua-l archive

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


On Fri, 04 Nov 2011 00:31:02 +0100
Georg Lehner <jorge-lua@magma.com.ni> wrote:

Hi Georg,

> Asynchronouos I/O:
> 
> This is a challenging topic and I would like to see a good proposal how 
> to make it fit in
> nicely with the Lua core.
> 
> However I have the impression, that there is no standard way for 
> concurrency in Lua except
> coroutines.  Adding "fileevents" or asynchronous I/O to the Lua core 
> would require to add
> a central dispatching mechanism to it (event loop, wait queues, or the 
> like) and this seems
> to much additional complexity and intrusion with respect to the scope of 
> the "fs" proposal.

just as a side note, an application does not necessarily have to be
multithreaded for using asynchronous I/O. For overlapping reads and
writes, one would just have to synchronize on the completion of said
operations.

This was just an example. Asynchronous I/O may not be a top priority
for everyone, but I would at least keep this in mind if I started to
design a vfs. To add this (and loops, and mounts, and locks, etc.) later
may turn out nasty and result in a messy collection of functions
instead of an API.

- Timm

-- 
Timm S. Mueller <tmueller@schulze-mueller.de>
Schulze & Mueller GbR, Jungstr. 2, 10247 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 85610000, http://www.schulze-mueller.de/