We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abstracting handler data could allow for modulation of handler data processing.
class TimeoutHandlerData<T>(execute: (T) -> Unit, filter: List<(T) -> Boolean>, val timeout: Long = Long.MAX_VALUE) : HandlerData<T>(execute: (T) -> Unit, filter: List<(T) -> Boolean>) { val timeAdded = System.currentTimeMillis() override fun execute(storage: MutableList<HandlerData<T>>) { if (System.currentTimeMillis() - timeAdded > timeout) { storage.remove(this) return } super.execute(storage) // runs execute block } }
Here is an example of a handler that will be removed after x amount of time
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Abstracting handler data could allow for modulation of handler data processing.
Here is an example of a handler that will be removed after x amount of time
The text was updated successfully, but these errors were encountered: