Use thread_local.