Skip to content

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

Open
jonashaag wants to merge 1 commit into
dask:mainfrom
jonashaag:test-gil
Open

Test that tasks holding the GIL for too long are marked suspicious#3926
jonashaag wants to merge 1 commit into
dask:mainfrom
jonashaag:test-gil

Conversation

@jonashaag

Copy link
Copy Markdown
Contributor

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

cc @fjetter

@fjetter

fjetter commented Jun 26, 2020

Copy link
Copy Markdown
Member

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

@mrocklin

Copy link
Copy Markdown
Member

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

Base automatically changed from master to main March 8, 2021 19:04
@jonashaag jonashaag requested a review from fjetter as a code owner January 23, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants