-
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
poll: performance improvements, simplifications
We preallocate the arrays used for pollfds, based on what the system can tolerate (tunable with NNG_MAX_OPEN), and we change the code for inserting and removing pollfds from the list so that it can run without acquiring the locks during the main loop, only when adding or removing files. The poll() implementation is very nearly lock free in the hot code path, and soon will be.
- Loading branch information
Showing
1 changed file
with
84 additions
and
85 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