#474 Use a single thread pool while watching module builds
Merged by onosek. Opened by csomh.
csomh/rpkg reuse-threads  into  master

Download 474.patch

Calling the Pool() constructor on each iteration leaks the threads,
leading to a "can't start new thread" error during long waits.

This can be aggravated by the constructor being called without an
argument, which by default uses the systems CPU count to create the
pool. When running in a container in a cloud environment this number can
be unexpectedly large (for example, 64).

Reuse the pool and limit the number of threads in the pool.

Signed-off-by: Hunor Csomortáni csomh@redhat.com

@cqi @mprahl ptal

Currently this is a blocker to set up a Jenkins job to run tests for MBS, as the Jenkins instance I'm using creates the node in OpenShift. Under these circumstances, the number of threads created by the "watch" command/option reaches the system limit within 5 minutes or so.

:thumbsup: from me but I don't have merge access.

I am merging the PR, it looks safe.

Pull-Request has been merged by onosek

Updates with the patch were created in Bodhi; internal packages are also prepared for RHEL Compose.

:tada:

Thanks @onosek!

Metadata