simulator/src/main/java/com/hazelcast/simulator/agent/workerprocess/WorkerProcessManager.java
public void launch(CreateWorkerOperation op, Promise promise) {
        WorkerParameters workerParameters = op.getWorkerParameters();

        // we add the pid to the worker-parameters so the worker can check if the agent is still alive.
        workerParameters.set("agent.pid", getPID());

        WorkerProcessLauncher launcher = new WorkerProcessLauncher(WorkerProcessManager.this, workerParameters);
        LaunchSingleWorkerTask task = new LaunchSingleWorkerTask(launcher, workerParameters, promise);
        executorService.schedule(task, op.getDelayMs(), MILLISECONDS);
    }
public void launch(CreateWorkerOperation op, Promise promise) {
        WorkerParameters workerParameters = op.getWorkerParameters();

        // we add the pid to the worker-parameters so the worker can check if the agent is still alive.
        workerParameters.set("agent.pid", getPID());

        WorkerProcessLauncher launcher = new WorkerProcessLauncher(WorkerProcessManager.this, workerParameters);
        LaunchSingleWorkerTask task = new LaunchSingleWorkerTask(launcher, workerParameters, promise);
        executorService.schedule(task, op.getDelayMs(), MILLISECONDS);
    }
launching is done asynchronous so we don't block the calling thread (messaging thread)