lua-users home
lua-l archive

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


Hello,

I need to implement a custom lua function that unfortunately has some latency - say, it reads from disk and returns the data:

With a single call it's bearable but if there is a script like
```
foo();
foo();
foo();
```

then the latency multiplies. Is it possible to recognize that a caller does not really read foo's return value in the script?
The motivation - to batch I/O requests together in that case by returning from the function earlier than the I/O finishes

--
Best regards,
     Roman