In WSGI server that forks the main process, not waiting the end of threads creates a dead lock. issue9377 review311651002