enable maxDescriptors on Illumos/Solaris (#19295)
This commit is contained in:
parent
a9223d4cdd
commit
23d64be860
2 changed files with 4 additions and 4 deletions
|
|
@ -1974,11 +1974,11 @@ when defined(posix):
|
||||||
import posix
|
import posix
|
||||||
|
|
||||||
when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
||||||
defined(zephyr) or defined(freertos):
|
defined(solaris) or defined(zephyr) or defined(freertos):
|
||||||
proc maxDescriptors*(): int {.raises: OSError.} =
|
proc maxDescriptors*(): int {.raises: OSError.} =
|
||||||
## Returns the maximum number of active file descriptors for the current
|
## Returns the maximum number of active file descriptors for the current
|
||||||
## process. This involves a system call. For now `maxDescriptors` is
|
## process. This involves a system call. For now `maxDescriptors` is
|
||||||
## supported on the following OSes: Windows, Linux, OSX, BSD.
|
## supported on the following OSes: Windows, Linux, OSX, BSD, Solaris.
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
result = 16_700_000
|
result = 16_700_000
|
||||||
elif defined(zephyr) or defined(freertos):
|
elif defined(zephyr) or defined(freertos):
|
||||||
|
|
|
||||||
|
|
@ -324,11 +324,11 @@ else:
|
||||||
doAssert(timeout >= -1, "Cannot select with a negative value, got: " & $timeout)
|
doAssert(timeout >= -1, "Cannot select with a negative value, got: " & $timeout)
|
||||||
|
|
||||||
when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
||||||
defined(zephyr) or defined(freertos):
|
defined(solaris) or defined(zephyr) or defined(freertos):
|
||||||
template maxDescriptors*(): int =
|
template maxDescriptors*(): int =
|
||||||
## Returns the maximum number of active file descriptors for the current
|
## Returns the maximum number of active file descriptors for the current
|
||||||
## process. This involves a system call. For now `maxDescriptors` is
|
## process. This involves a system call. For now `maxDescriptors` is
|
||||||
## supported on the following OSes: Windows, Linux, OSX, BSD.
|
## supported on the following OSes: Windows, Linux, OSX, BSD, Solaris.
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
16_700_000
|
16_700_000
|
||||||
elif defined(zephyr) or defined(freertos):
|
elif defined(zephyr) or defined(freertos):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue