Skip to content

Conversation

@brookman1
Copy link

@brookman1 brookman1 commented Oct 8, 2021

time.sleep(n) is a kernel call that pauses the entire Python interpreter, Python threads a virtual. Using condition.wait(n) lets the other threads execute while waiting, this bypasses the GIL (global interpreter lock).

Enabled tests to run after commit. Please say if you want me to redo the request without the tests, or ask to fix the tests if needed.

Created this pull request for leshchenko1979, https://github.com/brookman1/retry/tree/condition_wait

Thanks.

    time.sleep(n) is a kernel call that pauses the entire Python interpreter, Python threads a virtual.  Using condition.wait(n) lets the other threads execute while waiting, this bypasses the GIL (global interpreter lock).

    Added workflow to enable tests after commit.
@leshchenko1979
Copy link

Hi! This seems like an important update!

I've collected some the PRs from this repo to https://github.com/leshchenko1979/reretry.

If you could be so kind as to rebase your PR on that repo, I would gladly merge it there.

@brookman1
Copy link
Author

brookman1 commented May 17, 2022

Added pull request with removal of prints and context manager changes, added a threaded test: #54

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