diff options
| -rw-r--r-- | monoio/src/runtime.rs | 4 | ||||
| -rw-r--r-- | monoio/src/task/harness.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/monoio/src/runtime.rs b/monoio/src/runtime.rs index d5c0cfa..1290b39 100644 --- a/monoio/src/runtime.rs +++ b/monoio/src/runtime.rs @@ -225,6 +225,7 @@ impl<D> Runtime<D> { /// Fusion Runtime is a wrapper of io_uring driver or legacy driver based runtime. /// Fusion Runtime 是 io_uring driver 或者 legacy driver 的运行时的包装器 | 依照平台自动探测 +/// 所以很复杂 #[cfg(all(unix, feature = "legacy"))] pub enum FusionRuntime<#[cfg(all(target_os = "linux", feature = "iouring"))] L, R> { /// Uring driver based runtime. @@ -385,7 +386,8 @@ impl From<Runtime<TimeDriver<IoUringDriver>>> for FusionRuntime<TimeDriver<IoUri /// There is no guarantee that a spawned task will execute to completion. When a /// runtime is shutdown, all outstanding tasks are dropped, regardless of the /// lifecycle of that task. -/// 生成任务允许任务并发执行,当一个任务关闭后,其他任务一同结束. +/// 生成的任务将和 其他任务 并发执行(都在就绪队列里) +/// 但无法保证 生成的任务 一定执行完毕,runtime 结束时,未完成任务都会被 drop /// /// /// [`JoinHandle`]: monoio::task::JoinHandle diff --git a/monoio/src/task/harness.rs b/monoio/src/task/harness.rs index d181714..81c214e 100644 --- a/monoio/src/task/harness.rs +++ b/monoio/src/task/harness.rs @@ -16,7 +16,7 @@ use crate::{ utils::thread_id::{try_get_current_thread_id, DEFAULT_THREAD_ID}, }; -// 非空 Cell 的包装 +// 非空 Cell 的包装 | 马鞍 pub(crate) struct Harness<T: Future, S: 'static> { cell: NonNull<Cell<T, S>>, } |
