From 29ff131f263b60f50d3de630feb34ffd1c41e384 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Thu, 25 Jul 2013 22:59:41 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20assert=20that=20only=20main=20t?= =?UTF-8?q?hread=20can=20launch=20a=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we run our tests then we are likely not on the main thread when we indirectly test this API. --- Frameworks/command/src/process.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/Frameworks/command/src/process.cc b/Frameworks/command/src/process.cc index 4b2b452f..a9c9fb98 100644 --- a/Frameworks/command/src/process.cc +++ b/Frameworks/command/src/process.cc @@ -206,7 +206,6 @@ namespace command size_t process_server_t::add (pid_t pid, process_t* callback) { D(DBF_Process, bug("pid %d, client key %zu\n", pid, next_client_key);); - ASSERT(pthread_main_np() != 0); client_to_callback.insert(std::make_pair(next_client_key, callback)); struct packet_t { size_t client_key; pid_t pid; } packet = { next_client_key, pid }; write(write_to_server, &packet, sizeof(packet)); @@ -216,7 +215,6 @@ namespace command void process_server_t::remove (size_t client_key) { D(DBF_Process, bug("client key %zu\n", client_key);); - ASSERT(pthread_main_np() != 0); client_to_callback.erase(client_to_callback.find(client_key)); } @@ -227,7 +225,6 @@ namespace command tmp.swap(process_exit); pthread_mutex_unlock(&process_exit_mutex); - ASSERT(pthread_main_np() != 0); iterate(it, tmp) { std::map::iterator client = client_to_callback.find(it->client_key);