C/c++ multiple threads inference problem

Hi, I have a question for multiple threads inference in c/c++.
The server uses 10 threads to handle request images from clients, and create 20 PredictorHandles(a PredictorHandle pool) to inference.
When server recv one image in a thread, server chooses an available PredictorHandle(not in use) from the PredictorHandle pool to inference. Each PredictorHandle is only used in one thread, but one thread can choose different PredictorHandle from the pool. Is this situation thread-safe?

1.handle created by MXPredCreate() not by MXPredCreateMultiThread()
2.I got thread dead lock sometimes by MXPredForward() if I reuse PredictorHandle created before
3.If I create PredictorHandle every time when used, it goes fine.