You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The specification requires asynchronous callbacks to use a timeout to limit execution:
The implementation SHOULD use a timeout to prevent indefinite callback execution.
The idiomatic way to handle timeouts in Go is to pass them along via a context to the point of computation. This is already plumbed in, a context is accepted to Reader.Collect and used during processing by passing it to the callback functions. Support for timeouts in these context should be added and documented:
Document reader's Collect methods as honoring the timeout in the passed context.
Update the periodicReader to pass the export timeout it holds to all callbacks during regular periodic collect calls.
This will change the meaning of the "export timeout" to effectively refer to the whole export process instead of the explicit export part. It seems like this will be the user expected behavior. When they set the value they expect the collection and sending of data to take no more then the configured value, it would be unexpected if the collection took greater than the timeout time.
All callbacks are already documented that they need to honor the timeout they are passed, no update needs to be applied there:
The specification requires asynchronous callbacks to use a timeout to limit execution:
The idiomatic way to handle timeouts in Go is to pass them along via a context to the point of computation. This is already plumbed in, a context is accepted to
Reader.Collect
and used during processing by passing it to the callback functions. Support for timeouts in these context should be added and documented:Collect
methods as honoring the timeout in the passed context.Reader
periodicReader
manualReader
periodicReader
to pass the export timeout it holds to all callbacks during regular periodiccollect
calls.All callbacks are already documented that they need to honor the timeout they are passed, no update needs to be applied there:
Callback
Int64Callback
Float64Callback
The text was updated successfully, but these errors were encountered: