[EM] Limiting the number of threads in the deferred pool

2016-07-16 Thread Arindam Mukherjee
I noticed that if we spawn even a single deferred task using EM.defer, twenty additional threads get spawned by default. Is there a way to limit this number initially to a lower value and grow only if more deferred tasks are created. Thanks, Arindam -- You received this message because you ar

[EM] Adding tasks to the event queue

2016-07-16 Thread Arindam Mukherjee
I am new to EventMachine and am integrating it with a Rails application. I intend to use the EventMachine reactor for connecting over AMQP (ruby-amqp), http/s as well as other protocols. I start the EM loop in a separate thread, initialized via a Rails initializer script. But thereafter, if I i

Re: [EM] Limiting the number of threads in the deferred pool

2016-07-16 Thread James Tucker
You can set `EventMachine.threadpool_size` before running any threads. There is no mechanism implemented for dynamic growth. On Wed, Jul 6, 2016 at 10:59 PM, Arindam Mukherjee < arindam.muker...@gmail.com> wrote: > I noticed that if we spawn even a single deferred task using EM.defer, > twenty a

Re: [EM] Adding tasks to the event queue

2016-07-16 Thread James Tucker
On Sun, Jul 3, 2016 at 5:14 AM, Arindam Mukherjee < arindam.muker...@gmail.com> wrote: > I am new to EventMachine and am integrating it with a Rails application. I > intend to use the EventMachine reactor for connecting over AMQP > (ruby-amqp), http/s as well as other protocols. > I recommend aga