squid icon indicating copy to clipboard operation
squid copied to clipboard

libcomm pt2: Convert Comm::iocb_table to a std::map

Open yadij opened this issue 2 years ago • 3 comments

Implementing an old TODO and removing the need to initialize and destruct the map on startup/shutdown.

yadij avatar Apr 20 '22 13:04 yadij

Draft for now since this has not been tested. Anyone who wants to assist with that please do. There should be no behavioural difference when this change is applied (ie any change is of interest at this point).

yadij avatar Apr 20 '22 13:04 yadij

What justifies iocb_table existence in the refactored code?

Only that I have run out of time for more refactoring of this table. It is just enough to redux the startup/shutdown logic.

yadij avatar Apr 20 '22 15:04 yadij

What justifies iocb_table existence in the refactored code?

Only that I have run out of time for more refactoring of this table. It is just enough to redux the startup/shutdown logic.

Since the current PR direction requires non-trivial work and code complications to achieve usable results and the alternative approach is likely to result in simpler code, we should try to remove this table instead. I have not checked all the details, but I suspect that the amount of changes would be about the same as in the current PR if one removes this table without changing how the remaining fd_table is initialized/destroyed. That minimal change would still accomplish the stated goals of this PR -- startup/shutdown logic improvements related to the iocb_table.

rousskov avatar Apr 20 '22 15:04 rousskov