Bug fix
This commit is contained in:
parent
369a55aa15
commit
7b305f171b
|
@ -42,7 +42,7 @@ impl FibonacciFuture {
|
|||
}
|
||||
|
||||
impl Future for FibonacciFuture {
|
||||
type Output = ();
|
||||
type Output = usize;
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
if self.i == self.cnt {
|
||||
println!("Fibonacci result: {}", self.a);
|
||||
|
|
|
@ -35,7 +35,7 @@ pub extern "C" fn user_should_switch(_handle: &SharedTaskHandle) -> bool {
|
|||
}
|
||||
|
||||
// 该执行器目前是测试使用,当轮询到一个完成的任务就退出了
|
||||
pub fn run_until_idle(
|
||||
pub fn run_until_ready(
|
||||
peek_task: impl Fn() -> TaskResult,
|
||||
delete_task: impl Fn(usize) -> bool,
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue