Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deadlock when flushing messages #843

Merged
merged 4 commits into from
Jan 20, 2023
Merged

Fix deadlock when flushing messages #843

merged 4 commits into from
Jan 20, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jan 20, 2023

The way things were set up dropping Arrow messages was grabbing the GIL which would deadlock since the shutdown function was already holding the GIL before flushing. Fix this by (1) dropping messages in their own thread so we never block the tcp_sender and (2) releasing the GIL during shutdown since we aren't interacting with any python objects anyways.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@jleibs jleibs marked this pull request as ready for review January 20, 2023 10:14
@emilk emilk self-requested a review January 20, 2023 10:20
@emilk emilk merged commit 3b5f4f3 into main Jan 20, 2023
@emilk emilk deleted the jleibs/fighting_the_gil branch January 20, 2023 12:56
@emilk emilk mentioned this pull request Jan 20, 2023
11 tasks
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.

2 participants