Establish controlled red-suite baseline
This commit is contained in:
@@ -77,7 +77,7 @@ fn estate_packet(blocked: &[UUID], trusted: &[UUID], allowed: &[UUID]) -> Estate
|
||||
}
|
||||
}
|
||||
|
||||
fn block_on_with<F: Future>(future: F, mut after_pending: impl FnMut()) -> F::Output {
|
||||
fn block_on_with<F: Future>(future: F, mut after_first_poll: impl FnMut()) -> F::Output {
|
||||
struct ThreadWake(std::thread::Thread);
|
||||
impl Wake for ThreadWake {
|
||||
fn wake(self: Arc<Self>) {
|
||||
@@ -93,7 +93,7 @@ fn block_on_with<F: Future>(future: F, mut after_pending: impl FnMut()) -> F::Ou
|
||||
Poll::Ready(value) => return value,
|
||||
Poll::Pending if !invoked => {
|
||||
invoked = true;
|
||||
after_pending();
|
||||
after_first_poll();
|
||||
}
|
||||
Poll::Pending => std::thread::park_timeout(Duration::from_millis(10)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user