enthought / enthought/mayavi

If `mlab` is imported, `matplotlib` stops working in a multiprocessing environment

Open
#1,024 2 comments 0 reactions 0 assignees View on GitHub
needs investigation
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

Consider the following MWE:

```python
#!/usr/bin/env python3

import concurrent.futures

from mayavi import mlab
import matplotlib.pyplot as plt

list_ = [1]

def function(_):
plt.figure()

with concurrent.futures.ProcessPoolExecutor() as ex:
futures = {ex.submit(function, _): _ for _ in list_}
```

When I run this, it hangs forever. But if I comment out the import of `mlab`, it does not hang.

This is with `python` 3.8.7, `matplotlib` 3.3.4 and `mayavi` 4.7.2.

I am happy to provide additional information.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.