aboutsummaryrefslogtreecommitdiff
path: root/src/tq.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tq.rs')
-rw-r--r--src/tq.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tq.rs b/src/tq.rs
index 3864025..985e0f8 100644
--- a/src/tq.rs
+++ b/src/tq.rs
@@ -42,7 +42,7 @@ where
nr: NotReady<Mono, Task>,
enable_interrupt: F1,
pend_handler: F2,
- mono: &mut Mono,
+ mono: Option<&mut Mono>,
) where
F1: FnOnce(),
F2: FnOnce(),
@@ -57,7 +57,9 @@ where
if if_heap_max_greater_than_nr {
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE && self.0.is_empty() {
- mono.enable_timer();
+ if let Some(mono) = mono {
+ mono.enable_timer();
+ }
enable_interrupt();
}