Skip to content

Commit 067d70f

Browse files
committed
add documentation for runtime configuration
1 parent 0b151d6 commit 067d70f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/lib.rs

+15
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,21 @@
230230
//! default-features = false
231231
//! features = ["alloc"]
232232
//! ```
233+
//!
234+
//! # Runtime configuration
235+
//!
236+
//! Several environment variables are available to tune the async-std
237+
//! runtime:
238+
//!
239+
//! * `ASYNC_STD_THREAD_COUNT`: The number of threads that the
240+
//! async-std runtime will start. By default, this is one per logical
241+
//! cpu as reported by the [num_cpus](num_cpus) crate, which may be
242+
//! different than the number of physical cpus. Async-std _will panic_
243+
//! if this is set to any value other than a positive integer.
244+
//! * `ASYNC_STD_THREAD_NAME`: The name that async-std's runtime
245+
//! threads report to the operating system. The default value is
246+
//! `"async-std/runtime"`.
247+
//!
233248
234249
#![cfg_attr(not(feature = "std"), no_std)]
235250
#![cfg_attr(feature = "docs", feature(doc_cfg))]

0 commit comments

Comments
 (0)