exitEmulatorManager(1);
}
- Overseer startupOverseer = Overseer.newOverseer("Start-up", InitAboutContents.class,
+ Overseer startupPreparations = Overseer.newOverseer("StartupPreparations",
+ InitAboutContents.class);
+ startupPreparations.startWork();
+
+ Overseer checkers = Overseer.newOverseer("Checkers",
CheckVT.class, CheckGPU.class, CheckSDCard.class);
- startupOverseer.startWork();
+ checkers.startWork();
+
// FIXME: we should not join overseer thread.
// but now we are not ready for asynchronous actions.
- startupOverseer.join();
+ startupPreparations.join();
+ checkers.join();
if (isConsoleMode) {
EmulatorManager.startConsoleProcessor();
import org.tizen.emulator.manager.logging.EMLogger;
public class Overseer {
+ private static final List<Overseer> overseers = new ArrayList<Overseer>();
+
private final List<Class<? extends Job>> jobClasses = new ArrayList<Class<? extends Job>>();
private Thread overseerThread;
private CountDownLatch doneSignal;
private Overseer() {};
+ public static Overseer lookupOverseer(String name) {
+ for (Overseer overseer: overseers) {
+ if (overseer.name.equals(name)) {
+ return overseer;
+ }
+ }
+
+ return null;
+ }
+
protected void startWorkInternal() throws InterruptedException {
doneSignal = new CountDownLatch(jobClasses.size());
overseer.registerJob(jobCls);
}
+ overseers.add(overseer);
+
return overseer;
}