Skip to content

Commit 1dac81a

Browse files
committed
Fix doctest
1 parent 0431825 commit 1dac81a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

relay-threading/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
//!
2727
//! ```rust
2828
//! use relay_threading::{AsyncPoolBuilder, AsyncPool};
29-
//! use tokio::runtime::Handle;
29+
//! use tokio::runtime::Runtime;
3030
//!
31-
//! // Create a runtime handle (for example purposes, using the current runtime)
32-
//! let runtime_handle = Handle::current();
31+
//! // Create a runtime (for example purposes, create one inline)
32+
//! let runtime_handle = Runtime::new().unwrap();
3333
//!
3434
//! // Build an async pool with 4 threads and a max of 100 concurrent tasks per thread
35-
//! let pool: AsyncPool<_> = AsyncPoolBuilder::new(runtime_handle)
35+
//! let pool: AsyncPool<_> = AsyncPoolBuilder::new(runtime_handle.handle().clone())
3636
//! .num_threads(4)
3737
//! .max_concurrency(100)
3838
//! .build()

0 commit comments

Comments
 (0)