pub fn stdin() -> Stdin {
    static INSTANCE: Lazy<Mutex<BufReader<StdinRaw>>> = lazy_init!(stdin_init);
    return Stdin {
        inner: INSTANCE.get().expect("cannot access stdin during shutdown"),
    };

    fn stdin_init() -> Arc<Mutex<BufReader<StdinRaw>>> {
        // The default buffer capacity is 64k, but apparently windows
        // doesn't like 64k reads on stdin. See #13304 for details, but the
        // idea is that on windows we use a slightly smaller buffer that's
        // been seen to be acceptable.
        Arc::new(Mutex::new(if cfg!(windows) {
            BufReader::with_capacity(8 * 1024, stdin_raw())
        } else {
            BufReader::new(stdin_raw())
        }))
    }
}
/// Create a new handle to the global standard input stream of this process.
///
/// The handle returned refers to a globally shared buffer between all threads.
/// Access is synchronized and can be explicitly controlled with the `lock()`
/// method.
///
/// The `Read` trait is implemented for the returned value but the `BufRead`
/// trait is not due to the global nature of the standard input stream. The
/// locked version, `StdinLock`, implements both `Read` and `BufRead`, however.
///
/// To avoid locking and buffering altogether, it is recommended to use the
/// `stdin_raw` constructor.
Create a new handle to the global standard input stream of this process.
The handle returned refers to a globally shared buffer between all threads.
Access is synchronized and can be explicitly controlled with the `lock()`
method.

The `Read` trait is implemented for the returned value but the `BufRead`
trait is not due to the global nature of the standard input stream.

To avoid locking and buffering altogether, it is recommended to use the
`stdin_raw` constructor.
Create a new handle to the global standard input stream of this process . The handle returned refers to a globally shared buffer between all threads . Access is synchronized and can be explicitly controlled with the ` lock () ` method . The ` Read ` trait is implemented for the returned value but the ` BufRead ` trait is not due to the global nature of the standard input stream . To avoid locking and buffering altogether it is recommended to use the ` stdin_raw ` constructor .
pub fn stdin() -> Stdin {
    static INSTANCE: Lazy<Mutex<BufReader<StdinRaw>>> = lazy_init!(stdin_init);
    return Stdin {
        inner: INSTANCE.get().expect("cannot access stdin during shutdown"),
    };
    fn stdin_init() -> Arc<Mutex<BufReader<StdinRaw>>> {
        // The default buffer capacity is 64k, but apparently windows
        // doesn't like 64k reads on stdin. See #13304 for details, but the
        // idea is that on windows we use a slightly smaller buffer that's
        // been seen to be acceptable.
        Arc::new(Mutex::new(if cfg!(windows) {
            BufReader::with_capacity(8 * 1024, stdin_raw())
        } else {
            BufReader::new(stdin_raw())
        }))
    }
}
pub fn stdin ( ) -> Stdin { static INSTANCE : Lazy < Mutex < BufReader < StdinRaw > > > = lazy_init ! ( stdin_init ) ; return Stdin { inner : INSTANCE . get ( ) . expect ( " " ) , } ; fn stdin_init ( ) -> Arc < Mutex < BufReader < StdinRaw > > > { // The default buffer capacity is 64k, but apparently windows // doesn't like 64k reads on stdin. See #13304 for details, but the // idea is that on windows we use a slightly smaller buffer that's // been seen to be acceptable. Arc :: new ( Mutex :: new ( if cfg ! ( windows ) { BufReader :: with_capacity ( 8 * 1024 , stdin_raw ( ) ) } else { BufReader :: new ( stdin_raw ( ) ) } ) ) } }
Create a new handle to the global standard input stream of this process.
Create a new handle to the global standard input stream of this process .