Skip to content

Commit 4870e64

Browse files
committed
src: Move constants into the library root in preparation for adding a pool allocator for stacks
1 parent cb51897 commit 4870e64

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ mod unfurl;
1717

1818
pub use linger::*;
1919

20+
const QUANTUM_MICROSECS: u64 = 100;
21+
const STACK_SIZE_BYTES: usize = 2 * 1_024 * 1_024;
22+
2023
#[cfg(test)]
2124
fn main() {}

src/linger.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use reusable::ReusableSync;
77
use signal::Set;
88
use signal::Signal;
99
use signal::siginfo_t;
10+
use super::QUANTUM_MICROSECS;
11+
use super::STACK_SIZE_BYTES;
1012
use std::cell::Cell;
1113
use std::cell::RefCell;
1214
use std::io::Result;
@@ -18,9 +20,6 @@ use timetravel::Context;
1820
use timetravel::HandlerContext;
1921
use unfurl::Unfurl;
2022

21-
const QUANTUM_MICROSECS: u64 = 100;
22-
const STACK_SIZE_BYTES: usize = 2 * 1_024 * 1_024;
23-
2423
pub enum Linger<T, F: FnMut(*mut Option<ThdResult<T>>) + Send> {
2524
Completion(T),
2625
Continuation(Continuation<F>),

0 commit comments

Comments
 (0)