I think (also based on your comment on Maciek) you should start by understanding the difference between threads and processes and how they can communicate.
:
. , shared_ptr , *. AFAICR, boost:: shared_ptr , , . (). , (o (1)) ( , 51 shared_ptrs ) /.
, , . , ( bcat). (/ ) . , , . (, - , , ? ? , ...) , , , shared_ptrs ( ).
, . , .
.
* - . push (j) pop() , , ( stl:: queue). , ). , stl:: queue boost:: mutex.