scipy/scipy — pull request #2858 by pv (2013-09-12 22:19:09+00:00)
Title: BUG: spatial/qhull: fix bug in incremental Voronoi + a deadlock

This PR fixes two issues:

- gh-2850 --- the Voronoi vertices are not updated properly if the incremental mode encounters a degenerate situation
- A deadlock due to the fact that Python garbage collector can execute a `__del__` method in any thread at any time. This can end up calling the `close()` method of one Qhull object while another Qhull object holds the lock and is computing (in single-threaded code!).

The deadlock fix is necessary for this PR, as the changes in the tests I made to test the other issue expose it.