Open Vedinsoh opened 1 year ago
When you add an operation to the queue, it gets wrapped in an anonymous function that does some prep work before kicking off your code. It's this wrapper that sets up the timeout handler, so the timer doesn't begin until your operation has been dequeued and started!
There doesn't appear to be any way to set a "pending" timeout—that is, a timer that begins when you add the operation and gets cleared if the operation starts before the timer elapses.
Documentation mentions the following:
Does that timeout apply to operations waiting in the queue that didn't start yet, those that are running (pending) or both? It's unclear from the text.