mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-19 00:00:09 +02:00
doc: remove incorrect panic section for Builder::worker_threads (#4849)
The documentation for the runtime `Builder::worker_threads` function incorrectly stated that it would panic if used when constructing a `current_thread` runtime. In truth, the call to the function has no effect. Since adding the described panic to the code could cause new panics in existing code using tokio, the documentation has been modified to describe the existing behavior. Refs: #4773
This commit is contained in:
@@ -293,11 +293,7 @@ impl Builder {
|
||||
///
|
||||
/// The default value is the number of cores available to the system.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// When using the `current_thread` runtime this method will panic, since
|
||||
/// those variants do not allow setting worker thread counts.
|
||||
///
|
||||
/// When using the `current_thread` runtime this method has no effect.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user