Update tests, examples, benches
This commit is contained in:
1 parent
bacac903b3
commit
85ccd7e507
89 files changed
+942
-1785
No files matched your search
@@ -3,6 +3,7 @@
|
||||
//! 10,000 independent tasks to test scaling
|
||||
|
||||
use criterion::Criterion;
|
||||
use futures::FutureExt;
|
||||
|
||||
pub fn bench_large_scale(c: &mut Criterion) {
|
||||
let rt = tokio::runtime::Runtime::new().unwrap();
|
||||
@@ -21,11 +22,9 @@ pub fn bench_large_scale(c: &mut Criterion) {
|
||||
dag.add_task(task_fn(move |_: ()| async move { i * 2 }));
|
||||
}
|
||||
|
||||
dag.run(|fut| {
|
||||
tokio::spawn(fut);
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
dag.run(|fut| tokio::spawn(fut).map(Result::unwrap))
|
||||
.await
|
||||
.unwrap();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user