hyperactor_multiprocess/scheduler.rs
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9use async_trait::async_trait;
10
11/// TODO: add missing doc
12#[async_trait]
13pub trait Scheduler {
14 /// TODO: add missing doc
15 type GangHandle;
16 /// TODO: add missing doc
17 async fn schedule_gang(&self, size: u64) -> Result<Self::GangHandle, anyhow::Error>;
18}
19
20/// TODO: add missing doc
21pub struct UnimplementedScheduler;
22
23#[async_trait]
24impl Scheduler for UnimplementedScheduler {
25 type GangHandle = !;
26
27 async fn schedule_gang(&self, _size: u64) -> Result<Self::GangHandle, anyhow::Error> {
28 unimplemented!()
29 }
30}