Skip to content

Commit

Permalink
In KqueueIOManager, close the force-wakeup fd
Browse files Browse the repository at this point in the history
This small bug was introduced in python-triogh-1551

Fixes python-triogh-1621
  • Loading branch information
njsmith committed Jun 16, 2020
1 parent e90c2da commit 1d9d0ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions newsfragments/1621.fix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On macOS and BSDs, explicitly close our wakeup socketpair when we're
done with it.
1 change: 1 addition & 0 deletions trio/_core/_io_kqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def statistics(self):

def close(self):
self._kqueue.close()
self._force_wakeup.close()

def force_wakeup(self):
self._force_wakeup.wakeup_thread_and_signal_safe()
Expand Down

0 comments on commit 1d9d0ca

Please sign in to comment.