diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-03-04 10:28:21 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-03-17 10:15:12 +0100 |
commit | 7cd7d8fb2756157df90d74f5dc8174788669628a (patch) | |
tree | e483b61defcea833566865c645139555de96fb9b /crates/core/tedge_core/Cargo.toml | |
parent | 5f66c1658118a2c7fb7d528037dda30f3674fd3f (diff) |
Add cancellation handling in application implementation
This patch makes use of the cancellation api of the
`tedge_api::CoreCommunication` type to implement cancellation of
plugins.
Note that the `PluginTask` does not know about cancellation because it
will automatically stop if the message receiver is closed, which might
or might not happen on a cancellation request.
If the cancellation request is issued, but plugins do not completely
halt their operation (just cancel what they are doing at the moment),
it is critical that the `CoreTask` (the routing part of the software)
does not stop working.
The cancellation token is passed to the plugins via the `Comms` type, so
the `PluginTask` does also not need to know about cancellation for the
same reasons.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge_core/Cargo.toml')
-rw-r--r-- | crates/core/tedge_core/Cargo.toml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/core/tedge_core/Cargo.toml b/crates/core/tedge_core/Cargo.toml index 61ff7bea..132b5d2d 100644 --- a/crates/core/tedge_core/Cargo.toml +++ b/crates/core/tedge_core/Cargo.toml @@ -11,6 +11,7 @@ futures = "0.3" serde = { version = "1.0.136", features = ["derive"] } thiserror = "1.0.30" tokio = { version = "1.16.1", features = ["sync", "macros"] } +tokio-util = "0.7" toml = "0.5.8" tracing = "0.1" |