[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: recognizing whether a caller uses function result
- From: Roman Gershman <romange@...>
- Date: Wed, 22 Feb 2023 06:48:54 +0200
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
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