joyent/libuv

threadpool: add an runtime API analogous to UV_THREADPOOL_SIZE

Closed this issue · 3 comments

If libuv is used as a library for a project, which is not accessible through the command line, it would be really helpful to have a function similiar to this:

int uv_set_threadpool_size(size_t size);

This function could be used to configure the threadpool size, without the need to use UV_THREADPOOL_SIZE, if this function is called before the first call to uv_queue_work, etc. Furthermore in the future this API could be used to dynamically change the maximum threadpool size.

If this is something you guys would be willing to merge, I'd be willing to write the necessary code. 😃

I have a proposal for a change to the threadpool which I plan to puiblish in the upcoming days, let me get back to you then ;-)

Oh… That sounds great!

I just posted the RFC here: libuv/libuv#7 Let's move the discussion there :-)