Hi,

 

I have a script that is using some packages. The script is set up such that
if the package it is trying to use is not installed, it will do a
``Pkg.add`` to add the package before ``using`` it.

 

This script is triggered by a third process, and it might be triggered
multiple times simultaneously, i.e. multiple instances of julia might run
the same script at the same time. Therefore the second julia instance might
issue the same ``Pkg.add`` command as the first instance, while the first
instance is not done with the ``Pkg.add`` yet.

 

I assume the package manager per se is not set up to handle that situation
gracefully?

 

If not, is there some package that allows me to have something like a
mutex/lock between my julia processes, so that I can guard the code section
that fiddles with packages and make sure only one julia instance at a time
runs that code?

 

Thanks,

David

 

--

David Anthoff

University of California, Berkeley

 

http://www.david-anthoff.com

 

Reply via email to