int main(int argc, char* argv[]){ request_records(0); //Get Caught Up std::thread jim (update); //jim constantly checks for updates. Poor jim. std::thread user_thread(user); //start update thread //start user thread jim.join(); user_thread.join(); }
int main() { std::thread user_thread(user); std::thread processors[N]; for (int i = 0; i < N; ++i) { processors[i] = std::thread(processor, i); } sleep(60); terminate = true; user_thread.join(); for (int i = 0; i < N; ++i) { processors[i].join(); } return 0; }
void Start (void) { user_thread (start_minigui, (char**)NULL, 0); }