MCPcopy Create free account
hub / github.com/alibaba/zvec / lock_for

Method lock_for

src/core/algorithm/diskann/diskann_algorithm.h:63–65  ·  view source on GitHub ↗

Acquire the striped lock guarding the given id (RAII).

Source from the content-addressed store, hash-verified

61
62 //! Acquire the striped lock guarding the given id (RAII).
63 [[nodiscard]] std::unique_lock<std::mutex> lock_for(diskann_id_t id) {
64 return std::unique_lock<std::mutex>(lock_pool_[id & kLockMask]);
65 }
66
67 float alpha_{DiskAnnEntity::kDefaultAlpha};
68 bool saturate_graph_{true};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected