A distributed approximate nearest neighborhood search (ANN) library which provides a high quality vector index build, search and distributed online serving toolkits for large scale vector search scenario.
Atomicicty is needed here because Logger::Logging is not const, so we can mangle things if shared_ptr is not updated atomically. We can use std::atomic in C++20 and above, and atomic_store/atomic_load otherwise.
Previous code GetLogger().reset() would not work correctly, because it would overwrite the copy of the static ptr, not the magic static s_pLogger inside of GetLogger(). We add an indirection to make it possible to override the static
Atomicicty is needed here because Logger::Logging is not const, so we can mangle things if shared_ptr is not updated atomically. We can use std::atomic in C++20 and above, and atomic_store/atomic_load otherwise.
Previous code GetLogger().reset() would not work correctly, because it would overwrite the copy of the static ptr, not the magic static s_pLogger inside of GetLogger(). We add an indirection to make it possible to override the static