Thread-safe C++ stack
问题 I'm new to C++ and am writing a multi-threaded app whereby different writers will be pushing objects onto a stack and readers pulling them off the stack (or at least pushing the pointer to an object).. Are there any structures built-into C++ which can handle this without adding locking code etc.? If not, what about the Boost libraries? EDIT: Hi. Thanks for the initial great answers. I guess one reason I thought this could be built-in was that I was thinking purely in x86 space and thought