I have a program where one thread creates a work queue and a bunch of workers that pull from it, and occasionally does some cleanup work for the workers. If the workers are all instances of FooWorker, what would I name the other class? One idea I've had so far is a FooManager, but maybe there's a better one?
Tell me more
×
Programmers Stack Exchange is a question and answer site for
professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
|
|
|||
|
|
There are some common names used for classes doing some expected logic:
So |
|||
|
|
|
The worker threads are called |
|||||||||||
|
|
Dispatcher? Manager is another alternative |
|||||
|
|
According to Pattern-Oriented Software Architecture this is called the "Master Slave" pattern. So the worker threads could be |
|||||
|
How about Manager + Slave ?Or maybe RudeManagerThread and HarriedWorkerWhoIsASlaveThread just for getting that kick. Make sure though who reviews your code. |
|||
|
|
