distributed icon indicating copy to clipboard operation
distributed copied to clipboard

Test that tasks holding the GIL for too long are marked suspicious

Open jonashaag opened this issue 5 years ago • 2 comments

Using usleep in PyDLL mode is a simple and reliable way to hold the GIL using only "pure Python" code.

cc @fjetter

jonashaag avatar Jun 26 '20 12:06 jonashaag

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

fjetter avatar Jun 26 '20 14:06 fjetter

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

mrocklin avatar Jun 26 '20 15:06 mrocklin