multi-thread connect