[DGD] Object upgrading

Raymond Jennings shentino at gmail.com
Wed Jul 4 12:26:38 CEST 2018


On Wed, Jul 4, 2018 at 3:10 AM <bart at wotf.org> wrote:
> On Wed, 4 Jul 2018 00:36:32 -0700, Raymond Jennings wrote
> > Nope, but the recompilation that triggers the code replacement and
> > queues up the patching process also necessitates the sandboxable
> > upgrade() call.
> >
> > Two separate jobs depending on the same recompile.
> >
> > > > This is how it works in kotaka
> > >
> > > Very similar in concept to how it workd on some other libs but different from
> > > what I would expect in one specific detail, the moment where you 'suspend'. I
> > > did not read anything in your explanation suggesting that cannot start a bit
> > > earlier, only that it should not start later.
> >
> > The suspension's side effects only matter once the task invoking it
> > completes, since DGD is single threaded (at least from the POV of
> > LPC).
>
> But if you start a call_out after the recompile completes, but without
> suspending the system, a user action or other pending call_out might fire
> before your 'upgrade' call_out fires. So, something could come inbetween
> unless you make sure this doesn't happen by suspending everything except for
> that one call_out.

I start the callout after the recompile yes, but before the task doing
the recompile terminates, sorry if I wasn't clear about that.

The suspension makes sure that the callout gets first dibs on dgd so
that the upgrade() call in the master object can run unmolested.

> > I just personally prefer to defer the suspension until the call_out
> > for passing along the call to upgrade is completed.  Technically it
> > can be done at any time.
>
> technically it should happen before the task which does the recompile
> completes and returns control to dgd.

It does.  The suspension is done before the task ends indeed.

> The exact moment within that task
> doesn't matter indeed. As I understand from your description of the process
> this is indeed the case with your codebase.

> Bart.
> --
> https://www.bartsplace.net/
> https://wotf.org/
> https://www.flickr.com/photos/mrobjective/
>
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd



More information about the DGD mailing list