Goldman Sachs Interview Question

How to pass variable from one thread to other?