@@ -920,7 +920,6 @@ function _precompilepkgs(pkgs::Vector{String},
920920                    circular =  pkg in  circular_deps
921921                    is_stale =  ! Base. isprecompiled (pkg; ignore_loaded= true , stale_cache, cachepath_cache, cachepaths, sourcepath, flags= cacheflags)
922922                    if  ! circular &&  is_stale
923-                         Base. acquire (parallel_limiter)
924923                        is_project_dep =  pkg in  project_deps
925924
926925                        #  std monitoring
@@ -938,7 +937,6 @@ function _precompilepkgs(pkgs::Vector{String},
938937                        fancyprint &&  notify (first_started)
939938                        if  interrupted_or_done. set
940939                            notify (was_processed[pkg_config])
941-                             Base. release (parallel_limiter)
942940                            return 
943941                        end 
944942                        try 
@@ -951,8 +949,13 @@ function _precompilepkgs(pkgs::Vector{String},
951949                                    #  for extensions, any extension in our direct dependencies is one we have a right to load
952950                                    #  for packages, we may load any extension (all possible triggers are accounted for above)
953951                                    loadable_exts =  haskey (ext_to_parent, pkg) ?  filter ((dep)-> haskey (ext_to_parent, dep), direct_deps[pkg]) :  nothing 
954-                                     Base. compilecache (pkg, sourcepath, std_pipe, std_pipe, keep_loaded_modules;
952+                                     Base. acquire (parallel_limiter)
953+                                     try 
954+                                         Base. compilecache (pkg, sourcepath, std_pipe, std_pipe, keep_loaded_modules;
955955                                                      flags, cacheflags, loadable_exts)
956+                                     finally 
957+                                         Base. release (parallel_limiter)
958+                                     end 
956959                                end 
957960                            end 
958961                            if  ret isa  Base. PrecompilableError
@@ -984,7 +987,6 @@ function _precompilepkgs(pkgs::Vector{String},
984987                        finally 
985988                            isopen (std_pipe. in) &&  close (std_pipe. in) #  close pipe to end the std output monitor
986989                            wait (t_monitor)
987-                             Base. release (parallel_limiter)
988990                        end 
989991                    else 
990992                        is_stale ||  (n_already_precomp +=  1 )
0 commit comments