{"id":61564,"library":"spscqueue","title":"spscqueue","description":"A bounded single-producer single-consumer wait-free and lock-free queue written in C++11","status":"active","version":"1.1","language":"cpp","source_language":null,"source_url":null,"tags":["lock-free","queue","concurrency","c++11"],"install":[{"cmd":"vcpkg install spscqueue","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(spscqueue CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE spscqueue::spscqueue)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"spscqueue/SPSCQueue.h","correct":"#include <spscqueue/SPSCQueue.h>"}],"quickstart":{"code":"#include <spscqueue/SPSCQueue.h>\n#include <iostream>\n\nint main() {\n    SPSCQueue<int> queue(1024);\n    queue.push(42);\n    int value;\n    if (queue.pop(value)) {\n        std::cout << \"Popped: \" << value << std::endl;\n    }\n    return 0;\n}","lang":"cpp","description":"Push and pop an integer from a bounded SPSC queue"},"warnings":[{"fix":"Ensure only one thread calls push() and one thread calls pop()","message":"Only supports single producer and single consumer; using multiple producers or consumers leads to data races","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'+11':21,28 'bound':3 'c':20,27 'concurr':26 'consum':9 'free':12,16,24 'lock':15,23 'lock-fre':14,22 'produc':6 'queue':17,25 'singl':5,8 'single-consum':7 'single-produc':4 'spscqueue':1 'wait':11 'wait-fre':10 'written':18","created_at":"2026-06-17T04:55:55.018765+00:00","updated_at":"2026-06-17T04:55:55.018765+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}