summaryrefslogtreecommitdiff
path: root/src/support/threads.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-01-24 15:50:13 -0800
committerGitHub <noreply@github.com>2018-01-24 15:50:13 -0800
commit0ddfd3a397eefde12a2999111cbdda0e77ab5639 (patch)
tree258ebeb10d0e2165acae4351228c82a23a7053e1 /src/support/threads.h
parent544cce0a37a124415b00a6b3a1dd2791d714a807 (diff)
downloadbinaryen-0ddfd3a397eefde12a2999111cbdda0e77ab5639.tar.gz
binaryen-0ddfd3a397eefde12a2999111cbdda0e77ab5639.tar.bz2
binaryen-0ddfd3a397eefde12a2999111cbdda0e77ab5639.zip
Threading fixes (#1377)
* threading fixes, be careful when creating the pool (more than one thread may try to) and don't create it just to check if its running in the thread constructor assertions * child threads will call ::get() - don't do initialize() under the lock
Diffstat (limited to 'src/support/threads.h')
-rw-r--r--src/support/threads.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/support/threads.h b/src/support/threads.h
index ec726370e..0ec109e4d 100644
--- a/src/support/threads.h
+++ b/src/support/threads.h
@@ -83,8 +83,7 @@ public:
// Get the number of cores we can use.
static size_t getNumCores();
- // Get the singleton threadpool. This can return null
- // if there is just one thread available.
+ // Get the singleton threadpool.
static ThreadPool* get();
// Execute a bunch of tasks by the pool. This calls