distributed
distributed copied to clipboard
Test that tasks holding the GIL for too long are marked suspicious
Using usleep in PyDLL mode is a simple and reliable way to hold the GIL using only "pure Python" code.
cc @fjetter
I'm curious what other people think about the usefulness of such a thing (we started building tests with this in our infrastructure since this is a problem for us).
If we want to include this here, a good place for a hold_gil function would probably be in https://github.com/dask/distributed/blob/master/distributed/utils_test.py
At first glance I like it. I've wanted a hold_gil function before. I would be happy putting that in distributed/utils_test.py