squid icon indicating copy to clipboard operation
squid copied to clipboard

Maintenance: move async and events code to libasync

Open kinkie opened this issue 1 year ago • 6 comments

Move Async and Events related code to own library in src/async

kinkie avatar Jan 13 '24 19:01 kinkie

Note: I have intentionally avoided creating Async namespace, this PR touches so much code already. If there is consensus to do it, I'll do that as a followup PR

kinkie avatar Jan 13 '24 19:01 kinkie

The idea for this PR stems from a comment in PR #1548

kinkie avatar Jan 13 '24 19:01 kinkie

I have intentionally avoided creating Async namespace, this PR touches so much code already.

FWIW, I do not think creating Async namespace is a good idea (in any PR).

rousskov avatar Jan 13 '24 21:01 rousskov

I have intentionally avoided creating Async namespace, this PR touches so much code already.

FWIW, I do not think creating Async namespace is a good idea (in any PR).

And yet it was you who decided all these objects should consume the Async prefix (a.k.a. namespace). You have a better alternative to rename them as?

IMO the AsyncJob and related pieces are sufficiently complex and self-contained to deserve their own library+namespace like this.

However, @kinkie please do not merge the EventLoop mechanism into it. That should have a separate library of its own.

yadij avatar Jan 13 '24 22:01 yadij

@kinkie, also be aware the AsyncEngine is an interface for the Engine mechanism, not the part of AsyncJob mechanism.

yadij avatar Jan 13 '24 22:01 yadij

I have intentionally avoided creating Async namespace, this PR touches so much code already.

FWIW, I do not think creating Async namespace is a good idea (in any PR).

Sure, but could you highlight why? It would be a deviation from standard practice, isn't it?

kinkie avatar Jan 14 '24 10:01 kinkie