diff --git a/doc/changes/DM-42188.feature.md b/doc/changes/DM-42188.feature.md new file mode 100644 index 0000000000..0940868ff3 --- /dev/null +++ b/doc/changes/DM-42188.feature.md @@ -0,0 +1 @@ +Added ``ButlerFactory``, a factory class for constructing Butler instances. This is intended for use in long-lived services that need to be able to create a Butler instance for each incoming client request. diff --git a/python/lsst/daf/butler/_butler_factory.py b/python/lsst/daf/butler/_butler_factory.py index aaf5b84b5b..a1f85aab86 100644 --- a/python/lsst/daf/butler/_butler_factory.py +++ b/python/lsst/daf/butler/_butler_factory.py @@ -58,11 +58,16 @@ class ButlerFactory: Notes ----- + This interface is currently considered experimental and is subject to + change. + For each label in the repository index, caches shared state to allow fast instantiation of new instances. Instance methods on this class are threadsafe. A single instance of - ButlerFactory can be shared between multiple threads. + `ButlerFactory` can be shared between multiple threads. Note that + ``DirectButler`` itself is not currently threadsafe, so this guarantee does + not buy you much. See DM-42317. """ def __init__(self, repositories: Mapping[str, str] | None = None) -> None: