Add multi-thread feature