forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: add task management to Channel class
Add a new Channel.create_task() method to create a task bound to the lifetime of the channel. Implement logic in .close() to delay the actual delivery of the "close" message until after all of the tasks have run to completion. Adjust various Channel-based users of tasks to use the new API. This is mostly changing the DBus channel to remove similar logic and make sure it exits cleanly. Specifically: once we decide to close the channel, we let any existing operations run to completion, but cancel all match rules (and prevent the creation of new ones) in order to avoid creating new work in response to incoming signals. Rename a method in ProtocolChannel to avoid a conflict. This is a method, so it should have a verb name anyway.
- Loading branch information
1 parent
f02af74
commit dba8270
Showing
4 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters