Use __thread static variable, #405