Skip to content

JavaThreadPoolExecutor have bounded queue for min_threads = 0 #182

@obrok

Description

@obrok

In JavaThreadPoolExecutor there is this:

if min_length == 0 && @max_queue == 0
  queue = java.util.concurrent.SynchronousQueue.new

It has the surprising result that Concurrent::ThreadPoolExecutor.new(max_threads: 4) has a bounded queue while Concurrent::ThreadPoolExecutor.new(max_threads: 4, min_threads: 1) an unbounded one. What is the reason for this condition? Maybe there should be a separate option for this?

Metadata

Metadata

Assignees

Labels

bugA bug in the library or documentation.questionAn user question, does not change the library.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions