diff --git a/README.md b/README.md index 497c986e..30e5b730 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,7 @@ fn main() { - [Work Steal Overview](core/docs/en/work-steal.md) - [Ordered Work Steal Overview](core/docs/en/ordered-work-steal.md) - [Coroutine Pool Overview](core/docs/en/coroutine-pool.md) +- [Hook Overview](hook/docs/en/hook.md) [我有故事,你有酒吗?](https://github.com/acl-dev/open-coroutine-docs) diff --git a/core/docs/en/coroutine-pool.md b/core/docs/en/coroutine-pool.md index 6d5bb33d..7664f366 100644 --- a/core/docs/en/coroutine-pool.md +++ b/core/docs/en/coroutine-pool.md @@ -15,7 +15,7 @@ fn main() -> std::io::Result<()> { let mut pool = CoroutinePool::default(); assert!(pool.is_empty()); pool.submit_task( - Some(String::from(task_name)), + None, |_| { println!("Hello, world!"); Some(2) diff --git a/core/docs/en/overview.md b/core/docs/en/overview.md index bba06adf..492f639b 100644 --- a/core/docs/en/overview.md +++ b/core/docs/en/overview.md @@ -29,3 +29,4 @@ replacement for IO thread pools, see [why better](../en/why-better.md). - [Work Steal Overview](../en/work-steal.md) - [Ordered Work Steal Overview](../en/ordered-work-steal.md) - [Coroutine Pool Overview](../en/coroutine-pool.md) +- [Hook Overview](../../../hook/docs/en/hook.md) diff --git a/hook/docs/en/hook.md b/hook/docs/en/hook.md new file mode 100644 index 00000000..4d944060 --- /dev/null +++ b/hook/docs/en/hook.md @@ -0,0 +1 @@ +todo \ No newline at end of file diff --git a/hook/src/lib.rs b/hook/src/lib.rs index 2e8fcccc..b4866625 100644 --- a/hook/src/lib.rs +++ b/hook/src/lib.rs @@ -45,7 +45,7 @@ clippy::separated_literal_suffix, // conflicts with clippy::unseparated_literal_suffix clippy::single_char_lifetime_names, // TODO: change lifetime names )] -//! see `https://github.com/acl-dev/open-coroutine` +#![doc = include_str!("../docs/en/hook.md")] use once_cell::sync::OnceCell; use open_coroutine_core::co_pool::task::UserTaskFunc;