Skip to content

Commit

Permalink
move to Async Runtime (using Tokio)
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
xpromache authored and mkolopanis committed Jun 29, 2023
1 parent d06516f commit e435fc1
Show file tree
Hide file tree
Showing 9 changed files with 966 additions and 913 deletions.
4 changes: 4 additions & 0 deletions cfdp-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ num-traits = "0.2"
pathdiff = "~0.2"
tempfile = "~3.3"
thiserror = "~1.0"
tokio = {version = "1.28.2", features = ["rt-multi-thread", "net", "sync", "time"]}
async-trait = "0.1"

[dev-dependencies]
rstest = "0.15.0"
rstest_reuse = "0.5.0"
signal-hook = "~0.3"
dirs = "~4.0"
tokio = {version = "1.28.2", features = ["parking_lot", "macros"]}
env_logger = "0.10"
458 changes: 208 additions & 250 deletions cfdp-core/src/daemon.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cfdp-core/src/transaction/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::num::TryFromIntError;

use crossbeam_channel::SendError;
use thiserror::Error;
use tokio::sync::mpsc::error::SendError;

use crate::{
daemon::{Indication, Report},
Expand All @@ -20,7 +20,7 @@ pub enum TransactionError {
#[error("Error Communicating with transport: {0}")]
Transport(#[from] Box<SendError<(VariableID, PDU)>>),

#[error("Error transfering Indication {0}")]
#[error("Error transferring Indication {0}")]
UserMessage(#[from] Box<SendError<Indication>>),

#[error("No open file in transaction: {0:?}")]
Expand Down
Loading

0 comments on commit e435fc1

Please sign in to comment.