Goldman Sachs interview question

How to pass variable from one thread to other?