add macro switcher for multi-thread.