Timeout documentation
What is the .timeout attribute in the documentation? It's listed there with no additional text.
What is the default value for timeout setting?
What happens if timeout value is exceeded and throwOnTimeout is false? Will it just be removed silently from the queue? In this case would it be possible to have a onTimeout callback to be notified when a timeout is exceeded so that we know it happened?
Timeout is documented here: https://github.com/sindresorhus/p-queue#timeout (which is linked to from here).
What is the default value for timeout setting?
I don't think there is one - if no timeout is set, then the function will be allowed to continue to run.
What happens if timeout value is exceeded and throwOnTimeout is false? Will it just be removed silently from the queue?
I believe so, based on this
In this case would it be possible to have a onTimeout callback to be notified when a timeout is exceeded so that we know it happened?
I'm interested in taking a look at this. Should be very easy if we choose to add it.
It's not competely clear to me either. Does an operation time out based on this timeout setting only when it is waiting in the queue (one of queue.size), and not after it has been pulled off the queue and is being processed (one of queue.pending)? Is it the job of the operation itself to time out after it has started (to prevent the whole queue from becoming stuck)? Or does the timeout in p-queue act in both states?
I'm interested in taking a look at this. Should be very easy if we choose to add it.
@bobjflong Were you able to? Adding the timeout documentation and that callback would be useful feature.