tezc / sc

Common libraries and data structures for C.
BSD 3-Clause "New" or "Revised" License
2.23k stars 239 forks source link

sc_sock: use dense events array instead of a sparse one on Windows #91

Closed svladykin closed 2 years ago

svladykin commented 2 years ago

Optimization:

codecov[bot] commented 2 years ago

Codecov Report

Merging #91 (9e4f201) into master (0b74cbc) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #91   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files          21       21           
  Lines        2192     2192           
  Branches      385      385           
=======================================
  Hits         2188     2188           
  Partials        4        4           
Impacted Files Coverage Δ
socket/sc_sock.c 100.00% <ø> (ø)

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 0b74cbc...9e4f201. Read the comment docs.

svladykin commented 2 years ago

There is a bug in this PR though: we do not update fdt->index on the moved last element. Tests do not catch it, probably need to store the pointer to the actual fdt alongside with data.

svladykin commented 2 years ago

Ok, this approach does not work at all in case when we delete a socket from poll inside of the event loop.