feat: code quality improvements for core

This commit is contained in:
Jonathan Kelley committed 2021-07-15 04:09:28 -04:00
1 parent 37ed4bed8c
commit 00231adfa2
12 files changed
+124 -758

No files matched your search

-42
View File
@@ -135,45 +135,3 @@ impl DTask {
}
}
}
// #[cfg(test)]
// mod tests {
// use std::time::Duration;
// use super::*;
// use bumpalo::Bump;
// #[async_std::test]
// async fn example() {
// let bump = Bump::new();
// type RawTask = Pin<Box<dyn Future<Output = ()>>>;
// // build the three
// let f1 = bump.alloc(Box::pin(async {
// //
// async_std::task::sleep(Duration::from_secs(3)).await;
// println!("3 sec")
// }) as RawTask);
// let f2 = bump.alloc(Box::pin(async {
// //
// async_std::task::sleep(Duration::from_secs(2)).await;
// println!("2 sec")
// }) as RawTask);
// let f3 = bump.alloc(Box::pin(async {
// //
// async_std::task::sleep(Duration::from_secs(1)).await;
// println!("1 sec");
// }) as RawTask);
// let mut queue = TaskQueue::new();
// queue.submit_task(DTask::debug_new(f1));
// queue.submit_task(DTask::debug_new(f2));
// queue.submit_task(DTask::debug_new(f3));
// while !queue.is_empty() {
// let next = queue.next().await;
// println!("Event received {:#?}", next);
// }
// }
// }