rufusraghunath / kelda

A thread pool for the browser, built on top of Web Workers
https://www.npmjs.com/package/kelda-js
MIT License
16 stars 0 forks source link

Consider "thread pool size" over "thread pool depth" #3

Open binkley opened 4 years ago

binkley commented 4 years ago

https://github.com/rufusraghunath/kelda/blob/68687436769b458a6a65520f9f797b862fa51b6f/src/kelda/Kelda.ts#L10

The word "depth" many not be as clear as "size" in context.

Alternatively, perhaps "thread pool queue depth" is meant here?

rufusraghunath commented 4 years ago

It's the number of Threads/Workers you're allowed to have at any one time. The queue only gets used to buffer Jobs when the threadPoolDepth is exceeded. You can see it used to populate the Threads when ThreadPool is initialized here.

I chose "depth" over "size" because it evokes "pool" for me. Is "size" more standard in the Java world?

binkley commented 4 years ago

Yes, I think you'll find "size" is the more common word choice to describe this.

In Javaland, the thinking runs along these lines (also true in Linux kernel land):