Github user zuyu commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/14#discussion_r66646360 --- Diff: cli/QuickstepCli.cpp --- @@ -323,13 +326,20 @@ int main(int argc, char* argv[]) { worker_client_ids, worker_numa_nodes); - foreman.setWorkerDirectory(&worker_directory); + Foreman foreman(main_thread_client_id, + &worker_directory, + &bus, + query_processor->getDefaultDatabase(), + query_processor->getStorageManager(), + num_numa_nodes_system); // Start the worker threads. for (Worker &worker : workers) { worker.start(); } + foreman.start(); --- End diff -- In the distributed version, `Foreman` starts first, and then `Worker`s starts to discover `Foreman`. So, I believe this is the right flow for the single node as well, although in this case, `Foreman` knows `Worker`s in advance, and I admit that it does not affect the correctness. But to me it is the best practice to initialize and terminate threads. @pateljm Any comments?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---