netstack3_base/work_queue.rs
1// Copyright 2023 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! Types for dealing with collaborative work queues.
6
7/// A common type returned by functions that perform bounded amounts of work.
8///
9/// This exists so cooperative task execution and yielding can be sensibly
10/// performed when dealing with long work queues.
11#[derive(Debug, Eq, PartialEq)]
12pub enum WorkQueueReport {
13 /// All the available work was done.
14 AllDone,
15 /// There's still pending work to do, execution was cut short.
16 Pending,
17}