[Oberon] When is it safe to unload a module?
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Mon Aug 6 11:27:25 CEST 2018
> 1. BlackBox Component Pascal:
>
> Unload M2
>
> result in the error:
>
> M3 not found (that’s right, M3 not M2)
>
> So once you unload M3 you can't unload anything else.
This should not happen. M3 is a client of M2, and unloading
M3 should have no effect on subsequently unloading M2.
If this really is what is happening, then BlackBox is .. perhaps..
not quite as industrial strength ;-) (although it really is robust).
A correct "safe module unloading" approach must handle *all*
possible cases in a correct way, as shown in an earlier post.
It’s all or nothing.
> Unload M3 M2 M1 M0
> Works OK.
I assume you mean “OK. even *after* executing M3.SetGProc1” ??
But *if* this is the case, *then* BlackBox has a correct
implementation of “group unloading”.
Ok, so they could have have said: “we don’t
handle all sub cases correctly, but at least we offer the ability
to unload modules as a group - which works"
I view group unloading as an essential feature.
One cannot claim completeness in a “safe module
unloading” implementation, unless one also implements
group unloading - and for ALL types of possible
references (i.e.: 1) client, 2) type tag, 3) procedure
variables in 3a) the heap and 3b) globals).
Again, it’s all or nothing.
-ap
More information about the Oberon
mailing list