Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix news entry issue
  • Loading branch information
shreyanavigyan committed Jun 7, 2021
commit c69acff7b868b0fbc16c7d8bd47f4eb2f10b6f55
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Fix a race condition in `MultiLoopChildWatcher`. The patch does the
Fix a race condition in ``MultiLoopChildWatcher``. The patch does the
following -

1) Creates a list that will keep track of the event loops where the handler
has been installed by `MultiLoopChildWatcher`.
has been installed by ``MultiLoopChildWatcher``.

2) In `attach_loop` and `add_child_handler`, the handler is installed for the
loop using `add_signal_handler` and the event loop instance is also added to
2) In ``attach_loop`` and ``add_child_handler``, the handler is installed for the
loop using ``add_signal_handler`` and the event loop instance is also added to
the list.

3) In `remove_child_handler`, the `remove_signal_handler` is called on the
3) In ``remove_child_handler``, the ``remove_signal_handler`` is called on the
loop the provided pid is attached to.

4) In `close`, the `remove_signal_handler` is called on every loop and the
4) In ``close``, the ``remove_signal_handler`` is called on every loop and the
loop is removed from the list.

The patch changes the behavior of `MultiLoopChildWatcher`. `MultiLoopChildWatcher`
The patch changes the behavior of ``MultiLoopChildWatcher``. ``MultiLoopChildWatcher``
can now only be used in the main thread.

Patch by Shreyan Avigyan