Skip to content

Conversation

@lxb007981
Copy link
Contributor

The goal of accept() is to accept a connection from any available listener as soon as possible. In the previous implementation, select! waits on only the current listener and a timer. It forces the executor to wait 1ms if the accept() call on the current listener doesn't return within 1ms, and if no connection is immediately available on the current listener, there will be another minimum 1ms delay.
This pr tries to improve it by using future::select_all to wait on multiple listeners simultaneously and return the first one that completes.

@SudoDios
Copy link
Collaborator

@lxb007981 Thank you.
From now on we don't need to enable time in runtime

@SudoDios SudoDios merged commit fad81b2 into librespeed:master May 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants