Skip to content
New issue

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

Timeout option question #183

Open
Vedinsoh opened this issue May 9, 2023 · 1 comment
Open

Timeout option question #183

Vedinsoh opened this issue May 9, 2023 · 1 comment

Comments

@Vedinsoh
Copy link

Vedinsoh commented May 9, 2023

Documentation mentions the following:

Per-operation timeout in milliseconds. Operations fulfill once timeout elapses if they haven't already.

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.

@alexwforsythe
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants