-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to using nonblocking fds with lwt
Summary: This is the result of a week long investigation into Flow occasionally hanging. Here's what you should know: * A read/write of a blocking fd will block until the fd is readable/writable * A read/write of a nonblocking fd will return -1 immediately if the fd is not readable/writable * Lwt super extra hates running blocking system calls. It will create system threads and run the blocking system call on them * There's a bug in Lwt in scheduling the system threads: ocsigen/lwt#569 From our point of view, there's very little difference in using blocking or non-blocking fds. We had just been using blocking fds since I couldn't really tell if one was better than the other, However, using non-blocking keeps us from needing system threads and works around the bug, so let's use them! Reviewed By: samwgoldman Differential Revision: D7464034 fbshipit-source-id: e0ba602381a8bef7dd374ee1cd5fb0fdef9ad7d9
- Loading branch information
1 parent
b55ba90
commit e314362
Showing
6 changed files
with
14 additions
and
11 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
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
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
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
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
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