Infinity Stone interview question

Programming question on multi-threads and processes