A C++ library providing multiple concurrent hash map implementations for high-performance multithreaded applications.
Junction is a C++ library that provides multiple concurrent hash map implementations for high-performance multithreaded applications. It solves the problem of thread-safe data access in concurrent systems by offering lock-free data structures that allow simultaneous reads and writes from multiple threads without requiring coarse-grained locking mechanisms.
C++ developers building high-performance multithreaded applications that require scalable concurrent data structures, particularly those working on systems where lock contention is a performance bottleneck.
Developers choose Junction over alternatives because it provides multiple specialized concurrent hash map implementations with different performance characteristics, offers strong memory ordering guarantees, and integrates easily with CMake-based build systems while being freely usable in commercial applications.
Concurrent data structures in C++
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers four distinct concurrent hash maps (Crude, Linear, Leapfrog, Grampa) with different performance and consistency trade-offs, allowing developers to optimize for specific use cases.
All member functions are atomic, enabling safe concurrent access without mutual exclusion, which reduces lock contention in multithreaded environments as highlighted in the README.
Linear, Leapfrog, and Grampa maps provide release-assign and consume-get semantics for safe non-atomic pointer passing between threads, ensuring happens-before consistency.
Integrates seamlessly with CMake-based projects via add_subdirectory or static library linking, and supports configuration through variables like TURF_PREFER_CPP11.
Only works with keys and values that are pointers or pointer-sized integers, restricting use cases that require complex data types like strings or custom objects.
Requires periodic calls to junction::DefaultQSBR.update to prevent memory leaks, adding complexity and potential for error in thread management.
Depends on the external Turf library for platform abstraction, which complicates the build process and may introduce compatibility issues in non-CMake environments.