Simple thread example with test for stdout.