RE: Lost output in multithreaded program