Can you please point me to a tutorial for an explanation of the specific "Critical section" implementation that is used in main.cpp. I would like to understand a bit better how does it work. I studied concurrency before so I have some background to be able to understand it.
Are you talking about the
CCriticalSection class? As you can see in
sync.h, it's just a wrapper around Boost's
recursive_mutex class. (It looks like the
CCriticalSection name comes from Windows.)
You can read all about Boost's threading API in its documentation.