Commit fdb5b703 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Ensure tag/* classes are loaded just once.

Instantiate the TagRegistry in Options class to prevent instantiation of
it when we're running the code in parallel forks.
parent c56d2b79
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -160,6 +160,12 @@ module JsDuck

      if @custom_tag_paths.length > 0
        TagRegistry.reconfigure(@custom_tag_paths)
      else
        # Ensure the TagRegistry get instantiated just once.
        # Otherwise the parallel processing causes multiple requests
        # to initialize the TagRegistry, resulting in loading the Tag
        # definitions multiple times.
        TagRegistry.instance
      end
    end