Exiting pthreads postMessage to report the exit, which requires the main thread to receive events in order to reuse them
#12.400 aberto em 1 de out. de 2020
Métricas do repositório
- Stars
- (27.361 stars)
- Métricas de merge de PR
- (Mesclagem média 19d 10h) (147 fundiu PRs em 30d)
Description
Hi there,
I'm totally at a loss on what to expect for pthread behavior with my application. I'm using emscripten to implement a wasm module that acts as a portable SIMD library for performing operations. The library calls from Node.JS are designed to be synchronous and leverage memory passing. Inside the library, I'm spawning threads to expedite the operations (performing prefix sums and converting RGB image pixels to YUV). The threads wouldn't even start at the beginning before PTHREAD_POOL_SIZE. Now that I've added it, it works up until N threads have been consumed. PROXY_TO_PTHREAD doesn't seem to do anything meaningful at least not with respect to my application and Node.JS.
I figure if a pool is needed, why not just treat it like a pool instead of exhausting it? On the other hand, what are my alternatives if this can't get resolved? I need to be able to call rgb2y more than one time.