Output

After compiling the application, running it produces the following output for the 50 total requests:

    $ ./dispatcher_demo.exe    Initialised.    Starting processing request 1...    Starting processing request 2...    Finished request 1    Starting processing request 3...    Finished request 3    Starting processing request 6...    Finished request 6    Starting processing request 8...    Finished request 8    Starting processing request 9...    Finished request 9    Finished request 2    Starting processing request 11...    Finished request 11    Starting processing request 12...    Finished request 12    Starting processing request 13...    Finished request 13    Starting processing request 14...    Finished request 14    Starting processing request 7...    Starting processing request 10...    Starting ...

Get Mastering C++ Multithreading now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.