M
Mullin Yu
I want to have a controller class to do
- initilization: create a thread pool with max 10 thread
- get ten records from the db every time
- assign each record to one thread
worker thread
- do the application logic
- once finish, tell the controller class
once all the ten worker threads finish the job, the controller gets the next
batch of ten records from the db, and then assign to the worker thread
1. is it a good design?
2. any pattern i can use
3. any simple coding on the web illustrating the concept of setting max
thread no., controller knows all the worker thread finished the job
thanks!
- initilization: create a thread pool with max 10 thread
- get ten records from the db every time
- assign each record to one thread
worker thread
- do the application logic
- once finish, tell the controller class
once all the ten worker threads finish the job, the controller gets the next
batch of ten records from the db, and then assign to the worker thread
1. is it a good design?
2. any pattern i can use
3. any simple coding on the web illustrating the concept of setting max
thread no., controller knows all the worker thread finished the job
thanks!