Re: Race condition on loading packages from 2 maxima processes in parallel?

Raymond Toy <[email protected]> Thu, 18 Jun 2026 15:50:07 -0700
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
On 6/18/26 8:43 AM, David Scherfgen wrote:

>
>
> Yes, in general, the user doesn't know. But it's sufficient if the 
> package itself knows. Take the LAPACK package for example: The 
> lapack.mac file just contains one line:
>
> load("load-lapack.lisp");
>
> So lapack.mac is just a proxy. This is ideal for our case, because we 
> could change it to:
>
> load("load-lapack.lisp", lock=true);
Perfect! Presumably it all works out ok if the user also did 
|load(lapack, lock=true)|?
>
> Or it could check whether it actually needs to compile files (is that 
> possible using some MK-DEFSYSTEM API?) and only then use the lock. 
> Other packages could do it the same way.

I think it’s possible, but IIRC, the cost of checking was somehow pretty 
high. (I have a vague memory of modifying things so that if you used, 
say, dgemm, only dgemm and dependencies were compiled. Didn’t save a 
whole lot.) But for something like lapack that has lots of large files, 
this could be a win. I don’t remember what the API was; had to do some 
digging.

>
> Exposing the functionality via the proposed "with-lock" is just a 
> nice-to-have for users who may need it.
That’s fine with me.
>
> Alternative &#8203;
>
>     &#8203;
>
&#8203;

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss