One-shot async initializer with retry-on-failure semantics.
Each spatial-index loader wraps its initialize() method in the same
guard: cache the in-flight promise so concurrent callers all await the
same work, but null it back out on rejection so the next caller can
retry from scratch. That pattern was duplicated four times across the
three loaders. This helper centralizes it.
One-shot async initializer with retry-on-failure semantics.
Each spatial-index loader wraps its
initialize()method in the same guard: cache the in-flight promise so concurrent callers all await the same work, but null it back out on rejection so the next caller can retry from scratch. That pattern was duplicated four times across the three loaders. This helper centralizes it.Example