Closed levibostian closed 6 years ago
The original reason that I wanted a timeout was because runTask()
was asynchronous and in case I forgot to ever call the completion
callback, the timeout would keep Wendy going.
Since I switched to synchronous, I decided to skip this for now.
Why:
runTask()
should timeout anyway because of that. runTask()
if I can help it because I don't want to interrupt a database query half way into execution. Or some other critical task such as that.
Every instance of
PendingTask
has a function,runTask(completion: (success: Bool) -> Unit)
.It would be a good idea to timeout eventually after starting a task, mark the pending task as complete but unsuccessful, then move on.