How to make appium accept multi-thread calls?

I’ve configured appium in config.json with “maxSession=10”, but when i started 2 threads to execute same automation testing steps on the appium via a hub, 1 thread succeeded, but another failed and got a error message telling “A new session could not be created. (Original error: Requested a new session but one was in progress)”.

Could anyone guide me, how to make appium accept multi-thread calls at the same time?