core-admin/qubes
Marek Marczykowski-Górecki bd9f1d2e7c
mgmt: add support for cancellable operations
Allow method handler to decide if operation could be cancelled. If yes,
when connection to the qubesd is terminated (and
protocol.connection_lost get called) the operation is cancelled using
standard asyncio method - in which case asyncio.CancelledError is thrown
inside method handler. This needs to be explicitly enabled, because
cancellable methods are much harder to write, to maintain consistent
system state.
Caveat: protocol.connection_lost is called only when trying to send some
data to it (and it's already terminated). Which makes this whole
mechanism useful only for events. Otherwise, when sending some data (and
possibly detecting that connection is broken), the operation is already
completed.

QubesOS/qubes-issues#2622
2017-05-12 14:25:26 +02:00
..
ext PCI extension cache PCIDevice objects 2017-04-15 23:50:11 +02:00
qmemman qmemman: update for py3k 2017-02-27 02:37:49 +01:00
storage Make pylint happy 2017-04-21 16:57:35 +02:00
tests Merge remote-tracking branch 'kalkin/device-assignments' into core3-devel 2017-04-21 17:09:33 +02:00
tools mgmt: add support for cancellable operations 2017-05-12 14:25:26 +02:00
vm vm/qubesvm: fix daemon startup function 2017-05-12 14:25:25 +02:00
__init__.py mgmt: move property value sanitization to property definition 2017-03-31 11:55:24 +02:00
app.py Make pylint happy 2017-04-21 16:57:35 +02:00
backup.py backup: add a little more usage info, include docs in main index 2017-04-21 19:58:32 +02:00
config.py mgmt: add label-related calls 2017-03-16 20:04:04 +01:00
core2migration.py Make pylint ♥ 2017-04-15 23:50:11 +02:00
devices.py Make pylint happy 2017-04-21 16:57:35 +02:00
dochelpers.py Add documentation for mgmt 2017-03-13 21:51:52 +01:00
events.py events: add function to remove event handlers 2017-05-12 14:25:26 +02:00
exc.py qubes: port core to python3 2017-01-20 16:42:51 +01:00
firewall.py Make pylint happy 2017-04-21 16:57:35 +02:00
log.py qubes: port core to python3 2017-01-20 16:42:51 +01:00
mgmt.py mgmt: add support for cancellable operations 2017-05-12 14:25:26 +02:00
mgmtinternal.py qubesd: add second socket for in-dom0 internal calls 2017-04-07 17:07:28 +02:00
rngdoc.py Make pylint happy 2017-04-21 16:57:35 +02:00
tarwriter.py Make pylint happy 2017-04-21 16:57:35 +02:00
utils.py Make pylint happy 2017-04-21 16:57:35 +02:00