Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IOCP on Windows #106

Merged
merged 5 commits into from
Apr 19, 2018
Merged

Use IOCP on Windows #106

merged 5 commits into from
Apr 19, 2018

Conversation

gaborcsardi
Copy link
Member

Instead of WaitForMultipleObjects.

This allows polling more than 64 connections at once. It also simplifies the workflow a bit.

The polling part is not very clean, because it turns out that the connection -> pollable conversion is not a very good model. In particular, on Windows, it is hard to find the connection that responses, after a poll. The libuv model (i.e. their "inheritance" between struct types) is a better fit.

This currently fails, because WaitForMultipleObjects
can wait on at most 64 objects. It will work, once
we switch to IOCP.
This allows polling more than 64 connections,
and also  simplifies the workflow somewhat.
@codecov-io
Copy link

codecov-io commented Apr 19, 2018

Codecov Report

Merging #106 into master will increase coverage by 0.28%.
The diff coverage is 95.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
+ Coverage   74.09%   74.38%   +0.28%     
==========================================
  Files          28       29       +1     
  Lines        2471     2495      +24     
==========================================
+ Hits         1831     1856      +25     
+ Misses        640      639       -1
Impacted Files Coverage Δ
src/win/stdio.c 86.66% <ø> (ø) ⬆️
src/poll.c 100% <100%> (ø) ⬆️
src/test-connections.cpp 100% <100%> (ø) ⬆️
src/win/iocp.c 83.33% <83.33%> (ø)
src/processx-connection.c 91.9% <96.72%> (+0.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80affdc...713c3a5. Read the comment docs.

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