Skip to content

About thread safety

Guillaume R edited this page May 1, 2018 · 2 revisions
  • Unless otherwise stated in their documentation, config parsers and writers aren't thread-safe.

  • ConfigSpec and ConversionTable aren't thread-safe.

  • Configs are thread-safe only if they are created with a specific method like Config.inMemoryConcurrent() or myConfigFormat.createConcurrentConfig().

  • The thread-safety of configurations created with Config.wrap(Map<String, Object>, ConfigFormat) entirely depends on the given map. If it's a ConcurrentHashMap then the configuration is thread-safe.

  • ObjectBinder and ObjectConverter are thread-safe.

  • The configurations created by ObjectBinder are thread-safe only if the bound object is safe.