squid icon indicating copy to clipboard operation
squid copied to clipboard

Refactor event scheduling for AsyncCall support

Open yadij opened this issue 2 years ago • 1 comments

Integrate AsyncCall better with Squid events mechanism by storing events as an AsyncCall which will be dialed when the event timeout occurs rather than as callback and generating a Call when event is due.

Add an API for scheduling AsyncCall with custom Dialers. Allowing Jobs to maintain a Pointer to their scheduled event and cancel it at any time up to the real dialing. Also allows Jobs to avoid static event callbacks that generate a Call just to jump back inside async protections.

Begins conversion of eventAdd() callers to the new API with a wishlist/TODO for ConnOpener sleeping.

yadij avatar Aug 29 '21 15:08 yadij

4a837ae: Update TcpLogger to new event queue API

FWIW, I do not recommend propagating changes to other use cases until we are done with the API and first use case (ConnOpener) changes. Otherwise, with the large amount of known problems we have to resolve, there will just be more new code to rewrite and nerve cells to waste.

rousskov avatar Aug 30 '21 14:08 rousskov