how to pass periodically changed variables in new thread?

in main thread, i have used timers to do some calculation, and some(a little more) variables changed periodically, and because the output those variables to stdout cost time, so i want use new thread to out put them.