|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
void ExecutiveProcess::dispatchCommand(Command& C) { // Job + Worker + Command; go!
|
|
|
void ExecutiveProcess::dispatchCommand(Command& C) { // Job + Worker + Command; go!
|
|
|
|
|
|
Job& J = Jobs.grab();
|
|
|
|
|
|
J.setCommand(C);
|
|
|
|
|
|
Worker& W = Workers.grab();
|
|
|
|
|
|
W.doJob(J);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
ExecutiveProcess::ExecutiveProcess(string& Version, string& Config) : // Simple construction.
|
|
|
ExecutiveProcess::ExecutiveProcess(string& Version, string& Config) : // Simple construction.
|
|
|
VersionInfo(Version),
|
|
|
VersionInfo(Version),
|
|
|
ConfigInfo(Config),
|
|
|
ConfigInfo(Config),
|
|
|
Jobs(0),
|
|
|
|
|
|
Workers(0),
|
|
|
|
|
|
Input(0),
|
|
|
|
|
|
Output(0),
|
|
|
|
|
|
QuitJobNumber(0) {}
|
|
|
QuitJobNumber(0) {}
|
|
|
|
|
|
|
|
|
~ExecutiveProcess::ExecutiveProcess() { // Deal with uncerimoneous shutdowns.
|
|
|
~ExecutiveProcess::ExecutiveProcess() { // Deal with uncerimoneous shutdowns.
|