thread soluion design

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top