diff --git a/holoviews/core/options.py b/holoviews/core/options.py index 597511c34c..b0e6a4a0a8 100644 --- a/holoviews/core/options.py +++ b/holoviews/core/options.py @@ -1787,7 +1787,9 @@ def id_offset(cls): """ max_ids = [] for backend in Store.renderers.keys(): - store_ids = Store.custom_options(backend=backend).keys() + # Ensure store_ids is immediately cast to list to avoid a + # race condition (#5533) + store_ids = list(Store.custom_options(backend=backend).keys()) max_id = max(store_ids)+1 if len(store_ids) > 0 else 0 max_ids.append(max_id) # If no backends defined (e.g. plotting not imported) return zero