support multi threading in slave