Fork自 PaddlePaddle / Paddle
scope's API modifies its internal state. And scope's API can be called from multiple threads during traing. Hence, we need locks to protect the scope's internal states. We can optimize it in the future. But the current solution is buggy. test=develop