On Wed, May 7, 2014 at 2:01 PM, Kees k <[email protected]> wrote:
> Hello all,
>
> I have a difficulty with integrating timerfd worker threads with another
> worker thread. Basically my app has two types of external threads:
> 1. worker thread that sleeps 10 ms ('does some blocking task') and returns
> 2. worker thread that is polls a timerfd and returns.
>
> The difficulty starts only when I create more than three timers (TIMERFDS >
> 3):
> 1. The worker thread that sleeps only returns after 1 second instead of 10
> ms.
> 2. timers work fine.

That's because your tasks are clogging the thread pool.  It's
currently of a fixed size and it probably won't come as a surprise
that said size is 4.  (You're probably wondering why.  It's
complicated.)

There are two things you can do:

1.  `env UV_THREADPOOL_SIZE=32 node app.js`

2. Create your own threads with uv_thread_create().

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHQurc-_GaNAhJ1KHTuXvVqp6vZn-9o5K%3DN72v1timqjeJ31Lw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to