Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion core/runtime/src/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ mod tests;

/// The internal state of the interval module. The value is whether the interval
/// function is still active.
#[derive(Default)]
struct IntervalInnerState {
active_map: HashMap<u32, CancellationToken>,
id: u32,
}

impl Default for IntervalInnerState {
fn default() -> Self {
Self {
active_map: HashMap::default(),
id: 1,
}
}
}

impl IntervalInnerState {
/// Get the interval handler map from the context, or add it to the context if not
/// present.
Expand Down