lua-users home
lua-l archive

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


On OS's with decent disk caches, writes are generally effectively
non-blocking unless you get ahead of what memory can hold and then you are
stuck no matter what.

Reads are effectively non-blocking if the data is in the disk cache.

So, that leaves the problem of reading when the data isn't in the disk
cache. The only way that can be "non-blocking" is if you can go and do
something else while waiting for the data. To do that, one needs a scheduler
and a task system. It isn't that hard to write such a thing in Lua, but
there isn't one that comes for free out of the box as it were.

Having addressed packaging in 5.1, I think one of the key things for Lua to
look at addressing next is some standards for things like task schedulers
and error handling. Given appropriate conventions together with where
possible a mechanisms not policy approach, this would probably help with the
development of extensions to do things like non-blocking I/O.

[Okay. That isn't my number one request for 5.2. My number one request is to
make pcall yield friendly or provide an alternative error handling mechanism
that is yield friendly.]

Mark