Main Thread
Close reąuest re c eive d by main thread
Mainthread sets teiminated property of calculation thread.
M ain thre ad waits for calculation thread to terminate
WaitFor operation completes. Main thread cle ans up after calculation thread and e»ts.
Pritne calculation thread.
Thread reads terminate d prop erty, and exits as soon as possible.