File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 26
26
//!
27
27
//! ```rust
28
28
//! use relay_threading::{AsyncPoolBuilder, AsyncPool};
29
- //! use tokio::runtime::Handle ;
29
+ //! use tokio::runtime::Runtime ;
30
30
//!
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 ();
33
33
//!
34
34
//! // 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() )
36
36
//! .num_threads(4)
37
37
//! .max_concurrency(100)
38
38
//! .build()
You can’t perform that action at this time.
0 commit comments