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 th
There is no built-in mechanism to support this in C++ nor in the Boost libraries (note: some people have written thread-safe stacks/etc. in the Boost style). You'll have to borrow some code or cook in your own synchronization.
Note that your case probably calls for a single-writer multiple-reader guard (SWMRG) in which multiple writer threads can access the stack (but only one at a given point in time) and in which multiple readers can access the stack (many at a given point in time). Richter has the reference implementation.