Get collab2 green
This commit is contained in:
parent
c529343ba1
commit
e1525e2b47
265 changed files with 64477 additions and 40 deletions
|
@ -17,6 +17,9 @@ use std::{
|
|||
use util::TryFutureExt;
|
||||
use waker_fn::waker_fn;
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
use rand::rngs::StdRng;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct BackgroundExecutor {
|
||||
dispatcher: Arc<dyn PlatformDispatcher>,
|
||||
|
@ -219,6 +222,16 @@ impl BackgroundExecutor {
|
|||
self.dispatcher.as_test().unwrap().allow_parking();
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn record_backtrace(&self) {
|
||||
self.dispatcher.as_test().unwrap().record_backtrace();
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn rng(&self) -> StdRng {
|
||||
self.dispatcher.as_test().unwrap().rng()
|
||||
}
|
||||
|
||||
pub fn num_cpus(&self) -> usize {
|
||||
num_cpus::get()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue