Barclays interview question

Multithreading