I am trying to understand a program which uses multi-threading with shared-memory. The parent thread calls the following function and I don\'t quite understand how it works.