Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dispatcher: lift pipe buffer size restriction
A task queue dispatcher puts all the tasks to the task queue at startup. Then workers are started and are taking the tasks from it. If there are many tasks in a task group (which roughly corresponds to a test suite), we can reach the pipe buffer size on putting into the queue, because `multiprocessing.SimpleQueue` uses a pipe under the hood. The solution is to use `multiprocessing.Queue`, which has an intermediate buffer before the underlying pipe and writes to the pipe in a background thread, without blocking a thread that calls `<queue>.put()`. The `Queue` API is a superset of the `SimpleQueue` API, so we can just replace the implementation. Let's also use `Queue` for the worker's output queue to be on the safe side and for consistency. Fixes #287
- Loading branch information