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

[Question]: Can ants execute tasks in order? #312

Closed
rts-gordon opened this issue Dec 21, 2023 · 1 comment
Closed

[Question]: Can ants execute tasks in order? #312

rts-gordon opened this issue Dec 21, 2023 · 1 comment
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@rts-gordon
Copy link

Questions with details

Hi there,
Thanks for the ants awesome project, it is very powerful.
The tasks in pool execute is unordered, it is possible execute tasks in order?

Thank you.

Code snippets (optional)

No response

@rts-gordon rts-gordon added help wanted Extra attention is needed question Further information is requested labels Dec 21, 2023
@panjf2000
Copy link
Owner

Were you talking about executing tasks in serialization? If so, I don't think any pools with concurrency purposes can and should do that. If you want to run your tasks in a strict order, why bother to use a pool? Why not just do it in one goroutine?

On the other hand, if what you wanted is the priority queue, then that's something conceivable, see #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants