Skip to content

Make ESIParser::Parsers a std::list#138

Merged
yadij merged 3 commits intosquid-cache:masterfrom
yadij:v4-esi-assertions
Jan 30, 2018
Merged

Make ESIParser::Parsers a std::list#138
yadij merged 3 commits intosquid-cache:masterfrom
yadij:v4-esi-assertions

Conversation

@yadij
Copy link
Contributor

@yadij yadij commented Jan 29, 2018

Resolves assertions on shutdown and an outstanding TODO.

yadij added 2 commits January 27, 2018 18:28
Resolves assertions on shutdown and an outstanding TODO.
Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objection if this works better than the current asserting code, but the new code can be made more reliable.


char *ESIParser::Type = NULL;
ESIParser::Register *ESIParser::Parsers = NULL;
std::list<ESIParser::Register *> ESIParser::Parsers;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, Parsers should be a pointer (to std::list or a similar container) so that we do not implicitly rely on the container object to already be there when we need to register a parser and to still be there when we need to deregister a parser.

I would also rename Parsers to ParserMakers or similar because we do not store Parsers in this container. We store "Register"(sic) objects that make Parsers (AFAICT).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder. Using our lookup function technique now instead.

@yadij yadij merged commit 57b6788 into squid-cache:master Jan 30, 2018
squidadm pushed a commit to squidadm/squid that referenced this pull request Feb 1, 2018
... and Replace ESIParser::Parsers global with ESIParser::GetRegistry() lookup function

Resolves assertions on shutdown and an outstanding TODO.
yadij added a commit that referenced this pull request Feb 2, 2018
... and Replace ESIParser::Parsers global with ESIParser::GetRegistry() lookup function

Resolves assertions on shutdown and an outstanding TODO.
@yadij yadij deleted the v4-esi-assertions branch September 20, 2022 06:06
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