Commit d9bc0dc
committed
Yield to the executor in the the Endpoint
As long as there is data to send or receive the `Endpoint` `Future`
will currently continue to execute and thereby retain the eventloop.
In order to allow other code to execute in between we yield back
to the executor after each iteration. Instead of doing mulitiple
iterations in one `EndpointDriver::poll` call we can just increase the
maximum amount of packets to send or receive in a single iteration
and pick a number which optimizes performance.
Therefore the loop gets completely removed.1 parent ec54b4e commit d9bc0dc
1 file changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
217 | 214 | | |
218 | 215 | | |
219 | 216 | | |
220 | 217 | | |
221 | 218 | | |
| 219 | + | |
222 | 220 | | |
223 | 221 | | |
224 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
0 commit comments