Skip to content
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.

Too many thread pools #4

Open
mattes opened this issue Mar 4, 2018 · 2 comments
Open

Too many thread pools #4

mattes opened this issue Mar 4, 2018 · 2 comments

Comments

@mattes
Copy link

mattes commented Mar 4, 2018

google-cloud-pubsub is starting a thread pool to process incoming messages:

            @stream_pool.map do |stream|
              Thread.new { stream.start }
            end

activejob-google_cloud_pubsub is doing the same:

pool = Concurrent::ThreadPoolExecutor.new(min_threads: @min_threads, max_threads: @max_threads, max_queue: -1)

... effectively duplicating the efforts of google-cloud-pubsub, if I'm not mistaken?

@ursm
Copy link
Owner

ursm commented Mar 7, 2018

Exactly. Earlier versions of google-cloud-pubsub did not use thread pools, but now it's an extra feature. I am going to fix this. Thank you very much for your attention!

@hellupline
Copy link

could #6 be the solution for this issue ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants