On Mon, May 3, 2021 at 4:25 AM Stephen R. van den Berg <[email protected]> wrote:
>
> Chris Angelico wrote:
> >My usual practice is to completely recompile the class, and have a
> >single mapping for all "carry-over" state, something like this:
>
> >And then to replace anything, I'd create a new instance of the
> >newly-compiled class, replace its empty state mapping with the same
> >one as the old object, and start using that. It's simple, reliable,
>
> Yes, if the class in completely in the source you control, that is fine.
> But in this case the class comes from a sort-of library (from which
> I inherit), and there is more state information than just the config, like:
>
> - Caches.
> - Database connection pools.
> - Active sockets.
> - Active sessions.
> - Various call_out timers still pending.
> - Statistics.
>

Ah, that does make it more complicated. Particularly with call_outs.

I don't think there's an easy way to do this.

ChrisA

Reply via email to