#20666·scikit-learn

Threads awaiting for GIL in Forest estimators

Author: glemaitreCreated Aug 3, 2021Updated Sep 28, 2026
LabelsPerformancemodule:ensemblefree-threading

Discussed in https://github.com/scikit-learn/scikit-learn/discussions/20651

In forest algorithms, the preferred parallelization backend is threading. However, it looks that it is not anymore the most appropriate backend. As discussed here, it might be that the GIL is not explicitly released in some part of the code locking the execution of the thread.

We need to investigate more to solve this issue.

Source: scikit-learn/scikit-learn