WIP
This commit is contained in:
parent
da8919002f
commit
0de4a93ec7
17 changed files with 22689 additions and 11 deletions
|
@ -152,14 +152,11 @@ impl Executor {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn block_with_timeout<F, R>(
|
||||
pub fn block_with_timeout<R>(
|
||||
&self,
|
||||
duration: Duration,
|
||||
future: F,
|
||||
) -> Result<R, impl Future<Output = R>>
|
||||
where
|
||||
F: Future<Output = R> + Send + Sync + 'static,
|
||||
{
|
||||
future: impl Future<Output = R>,
|
||||
) -> Result<R, impl Future<Output = R>> {
|
||||
let mut future = Box::pin(future);
|
||||
let timeout = {
|
||||
let future = &mut future;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue