-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
picoev: fix for windows apps with veb in a thread, parallel to a webv…
…iew, that opens a lot of file descriptors (vlang#23492)
- Loading branch information
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module picoev | ||
|
||
// max_fds is the maximum number of file descriptors that can be managed. | ||
// Many sizes depend on it, and some internal arrays are also iterated based on it, | ||
// so increasing it a lot can slow down looping :-| . | ||
pub const max_fds = 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module picoev | ||
|
||
// max_fds is the maximum number of file descriptors that can be managed. | ||
// Many sizes depend on it, and some internal arrays are also iterated based on it, | ||
// so increasing it a lot can slow down looping :-| . | ||
// It is higher on windows, because if you start a veb/picoev webservice in a thread, | ||
// the returned file descriptors can be higher than 1024 in value, especially if you | ||
// also have a webview running in another thread, that also opens its own file descriptors. | ||
// Note: this works, because on windows we use select, and select on win32, | ||
// is not limited to polling on only 1024 fds. | ||
pub const max_fds = 4096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters