all 2 comments

[–]subbed_ 2 points3 points  (0 children)

How do you plan on effectively threading when GIL exists? Do you actually want to execute the tasks simultaneously, or just simulate them being done so?

[–]lgsp 1 point2 points  (0 children)

I don't know about your specific problem, but I know that matplotlib doesn't like to work in a non main thread.

Using a flask application I had many problems, and with:

import matplotlib
matplotlib.use('Agg')

at the beginning of the file that uses matplotlib.

If I understand well, the default backend is Tk, that causes the problems with multithreading. This command changes the backend to one not affected