Question: I get this error when I try to compile my program. It has to do with the way I'm constructing the map, but I really can't see something wrong:

```
error: expected identifier before numeric constant 
map <int , vector <int> >  radixM (10 , vector <int> (100));

```

Any ideas?

Answer: 
Store the results of each thread in a stack. One thread collects results from every thread and adds them together. Of course the stack should not be empty.

If you want multiple threads to work on factorials why not create a thread or two that produce a list of factorial results. Other threads can just look up results if needed.
If you need high throughput, you can consider using Disruptor and RingBuffer.

At a crude level you can think of a Disruptor as a multicast graph of queues where producers put objects on it that are sent to all the consumers for parallel consumption through separate downstream queues. When you look inside you see that this network of queues is really a single data structure - a ring buffer.

Each producer and consumer has a sequence counter to indicate which slot in the buffer it's currently working on. Each producer/consumer writes its own sequence counter but can read the others' sequence counters

Few useful links: 

<https://lmax-exchange.github.io/disruptor>

<http://martinfowler.com/articles/lmax.html>

<https://softwareengineering.stackexchange.com/questions/244826/can-someone-explain-in-simple-terms-what-is-the-disruptor-pattern>