For background on the warning, see #834
<https://github.com/dropwizard/dropwizard/pull/834> and #1444
<https://github.com/dropwizard/dropwizard/pull/1444>.

The Javadoc of ThreadPoolExecutor
<https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html>
goes into detail about the different queueing and task-submission policies.
I'm not sure offhand if it's possible to block callers of
`ExecutorService#submit` as you want. Typically tasks are either queued,
dropped, or else a `RejectedExecutionException` is thrown, depending on the
configured policy.

On Fri, Jan 27, 2017 at 8:15 AM, <[email protected]> wrote:

> Hi,
>
> When I try to create an ExecutorService with dw's facilities:
>
>         ExecutorService jdbcExec = environment.lifecycle().
> executorService("jdbc-worker-%d").minThreads(2)
>                 .maxThreads(Runtime.getRuntime().
> availableProcessors()).build();
>
> I get the following warning:
>
> WARN  [2017-01-27 16:08:10,009] 
> io.dropwizard.lifecycle.setup.ExecutorServiceBuilder:
> Parameter 'maximumPoolSize' is conflicting with unbounded work queues
>
> What is the problem with a limited number of thread with an unbounded
> queue?
>
> What alternative do I have if I don't want callers of
> ExecutorService.submit to be blocked, but with a limited number of
> concurrently executed task?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Evan Meagher

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to