Skip to main content

setmaxstdio

Function setmaxstdio 

Source
pub fn setmaxstdio(new_max: u32) -> Result<u32>
Available on Windows only.
Expand description

Sets a maximum for the number of simultaneously open files at the stream I/O level.

The maximum allowed value is platform-dependent, typically 8192 on modern systems. Values that would overflow when converted to c_int or exceed the platform’s maximum will result in an error.

See https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmaxstdio?view=msvc-170

§Errors

Returns an error if:

  • new_max exceeds c_int::MAX (typically 2,147,483,647)
  • new_max is below the minimum (typically 20) or above the platform maximum (typically 8192)
  • The underlying _setmaxstdio call fails