Remove PThread.runningWorkers. NFC#26998
Conversation
|
Although this API is intended for internal use only, I think we need a changelog entry for this. wasm-vips previously relied on this in an /cc @toyobayashi FYI. |
8f1e710 to
bfa8d67
Compare
|
Good idea. Added a ChangeLog entry. |
bfa8d67 to
4601366
Compare
Remove `PThread.runningWorkers` and use `PThread.pthreads` instead to track running workers. `PThread.pthreads` already contains all the necessary information, and keeping both in sync was redundant. This also optimizes thread exit by replacing an O(N) array splice with an O(1) map deletion, at the cost of making count queries (mostly used in tests) O(N) instead of O(1). TAG=agy CONV=47f918e2-bd47-4e38-9a6d-af1765cf2f7e
|
gentle ping @kripken or @kleisauke ? |
4601366 to
b0993c4
Compare
|
LGTM, but the commit message includes the following trailers: I'm not sure whether these were added intentionally or what they are meant to indicate. |
They were not supposed to be there. Luckily the final commit message used is based on the PR description and not the git commit messages, and they were already removed therre. |
Remove
PThread.runningWorkersand usePThread.pthreadsinstead to track running workers.PThread.pthreadsalready contains all the necessary information, and keeping both in sync was redundant.This also optimizes thread exit by replacing an O(N) array splice with an O(1) map deletion, at the cost of making count queries (mostly used in tests) O(N) instead of O(1).