On 01/26/2014 06:58 PM, Amos Jeffries wrote:
> I am looking at making a few more items in the startup and shutdown
> sequences of Squid into Runners.
>
> I cannot quite see how to create dependencies such that Runner A does
> not occur until after Runner B has completed. Such as allocate cache
> heaps after initializing mempools, or opening listening sockets only
> after initializing SSL contexts and Auth schemes.
If you have runner(s) A that must run before runner(s) B, you use two
runner registries, A and B, one for each runner(s) group.
The existing examples are rrClaimMemoryNeeds and rrAfterConfig
registries which make sure that rrAfterConfig runners do not run until
all memory claims have been made by rrClaimMemoryNeeds runners.
Keeping registries as general as possible and naming them appropriately
is difficult. Please make sure to list them in the right order and
document their dependencies in the RunnerRegistry declaration.
If this gets really out of hand, we can add API to express and enforce
dependencies, but I do not think we are at that point yet.
HTH,
Alex.
Received on Tue Jan 28 2014 - 20:32:40 MST
This archive was generated by hypermail 2.2.0 : Wed Jan 29 2014 - 12:00:14 MST