dynavec / Docs / Concurrency

Concurrency

GIL-aware thread pool for I/O-bound AWS calls.

dynavec's workload is I/O-bound (network calls to AWS), and Python releases the GIL during those calls — so a thread pool gives real parallelism without an async rewrite. Batched writes fan out across threads, and search_many runs several queries concurrently.

# many queries at once
results = db.search_many(["q1", "q2", "q3"], top_k=5, namespace="kb")

# tune the pool
cfg = DynavecConfig(..., max_workers=16, parallel_writes=True)

# clean up the pool (or use the client as a context manager)
with Dynavec(cfg, embedder=emb) as db:
    ...
A native asyncio client (aioboto3) is on the roadmap for very high concurrency.