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

Implement ThreadedWorkerPool #1035

Open
Framstag opened this issue Mar 30, 2021 · 0 comments
Open

Implement ThreadedWorkerPool #1035

Framstag opened this issue Mar 30, 2021 · 0 comments
Labels
feature For issues and pull request that request or implement a new feature

Comments

@Framstag
Copy link
Owner

The header Worker.h defines a ThreadedWorker and some derived classes. Sometimes will want t process a queue by multiple instances of a ThreadedWorker (a pool).

In this case we would like to have a template of a specific Worker class, with the following features:

  • allows to construct a number of worker instances with the constructor arguments passed to the pool template
  • start the worker
  • expose a Wait() methods, that allows to wait for all worker to be finished
  • Frees all workers

See GenMergeAreas.cpp, MergeAreas for a manually crafted example

@Framstag Framstag added the feature For issues and pull request that request or implement a new feature label Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature For issues and pull request that request or implement a new feature
Projects
None yet
Development

No branches or pull requests

1 participant