Currently, timeout tracking in generated engines relies on a startTime field being set at the beginning of the invocation. Exposed user-defined functions do not set this field, so the last setting from a begin/action/end invocation takes hold. This effectively means that a user has (timeout)ms to invoke UDFs before they turn into a source of error messages that gets reset when action is invoked again.
It appears, if I am understanding the code correctly, that it should be possible to generate a wrapping function that sets the startTime field when invoked externally. Since all user-defined functions and the begin/action/end triumvirate are synchronized on the runlock, this ought to be enough to make it work.
I am attempting to make this modification now, I'll open a PR if I get a solution working.
Currently, timeout tracking in generated engines relies on a startTime field being set at the beginning of the invocation. Exposed user-defined functions do not set this field, so the last setting from a begin/action/end invocation takes hold. This effectively means that a user has (timeout)ms to invoke UDFs before they turn into a source of error messages that gets reset when action is invoked again.
It appears, if I am understanding the code correctly, that it should be possible to generate a wrapping function that sets the startTime field when invoked externally. Since all user-defined functions and the begin/action/end triumvirate are synchronized on the runlock, this ought to be enough to make it work.
I am attempting to make this modification now, I'll open a PR if I get a solution working.