Skip to content

Commit

Permalink
Add interleaving support to tree model.
Browse files Browse the repository at this point in the history
This commit adds support for interleaved regions and nodes to the tree
model, but does not use it yet. This commit can be tested to verify
that the changes do not impact the non-interleaved case.
  • Loading branch information
martinling committed Oct 29, 2024
1 parent 84789ba commit 8f47902
Show file tree
Hide file tree
Showing 2 changed files with 1,380 additions and 98 deletions.
16 changes: 13 additions & 3 deletions src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,15 +1439,25 @@ impl EndpointReader {
#[derive(Copy, Clone)]
pub enum CompletionStatus {
Complete,
Ongoing
Ongoing,
InterleavedComplete(u64),
InterleavedOngoing,
}

impl CompletionStatus {
pub fn is_complete(&self) -> bool {
use CompletionStatus::*;
match self {
Complete => true,
Ongoing => false,
Complete | InterleavedComplete(_) => true,
Ongoing | InterleavedOngoing => false,
}
}

pub fn is_interleaved(&self) -> bool {
use CompletionStatus::*;
match self {
InterleavedComplete(_) | InterleavedOngoing => true,
Complete | Ongoing => false,
}
}
}
Expand Down
Loading

0 comments on commit 8f47902

Please sign in to comment.