pi-async-runtime-core 0.1.2

与具体执行器和队列实现无关的运行时核心能力
Documentation
fn reserve_runtime_id_inner() -> pi_result::Result<RuntimeIdReservation> {
    Ok(RuntimeIdReservation {
        id: RuntimeId::try_new()?,
    })
}

fn reserved_runtime_id_inner(this: &RuntimeIdReservation) -> RuntimeId {
    this.id
}

fn factory_from_reservation_inner<S: Schedule, N: TaskNotifier>(
    reservation: RuntimeIdReservation,
    schedule: S,
    notifier: N,
    queue_support: QueueSupport,
) -> TaskFactory<S, N> {
    TaskFactory {
        runtime_id: reservation.id,
        schedule,
        notifier,
        queue_support,
    }
}

fn factory_return_inner<S: Schedule, N: TaskNotifier>(this: &TaskFactory<S, N>, task: Runnable) {
    this.schedule.schedule(task);
}