| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Before this all Emscripten builds would use 1 core, but it is important to
allow pthreads builds there to use more.
|
|
|
|
| |
This code predates our adoption of C++14 and can now be removed in favor of
`std::make_unique`, which should be more efficient.
|
| |
|
|
|
| |
Applies the changes in #2065, and temprarily disables the hook since it's too slow to run on a change this large. We should re-enable it in a later commit.
|
|
|
| |
Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
|
|
|
|
|
| |
This was causing a deadlock while destroying the thread pool.
|
|
|
|
|
|
| |
* simplify ThreadPool::isRunning: it doesn't need to be static and to go through the global unique_ptr
* it's undefined behavior to access the threadpool from a shutting down thread, as the parent is being destroyed
|
|
|
|
|
|
|
|
| |
Refactor ThreadPool code for clarity and to fix some bugs with using the pool from different threads in parallel.
We have a singleton pool, and need to ensure it is created only once and used only by one thread at a time. This model is a simple way to ensure we use a number of threads equal to the number of cores, more or less (a pool per Module might lead to number of cores * number of Modules being optimized).
This refactoring adds a parent pointer in the worker threads (giving them direct access to the pool makes it simpler to make sure that pool and thread creation and teardown are threadsafe). This commit also adds proper locking around pool creation and pool usage.
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
* don't use multiple threads in torture tests, which are parallel anyhow
* if we fail to create a thread, don't use multiple threads
|
|
|
| |
New binaryen.js implementation, based on the C API underneath and with a JS-friendly API on top. See docs under docs/ for API details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit modernize the code base by replacing:
std::unique_ptr<T>(new T(...))
with:
make_unique<T>(...)
or:
wasm::make_unique<T>(...)
This is a step closer to adopt C++14 std::make_unique<T>(...).
|
|
|
|
| |
variables we only use in asserts (#579)
|
| |
|
|
|
| |
As in #382.
|
|
|
|
| |
just one core, since then we run it all on the main thread anyhow
|
| |
|
|
* allow traversals to mark themselves as function-parallel, in which case we run them using a thread pool. also mark some thread-safety risks (interned strings, arena allocators) with assertions they modify only on the main thread
|