Closed kpu closed 3 years ago
Just use a return to exit the loop. Nobody should call this function multiple times.
return
https://github.com/browsermt/mts/blob/d9aa0c50f56e91c83e53449ce197d337301af3df/src/bergamot/batch_translator.cpp#L113
Also, the use of atomic suggests it is meant to be manipulated from multiple threads. When this is really only a local variable.
Just use a
return
to exit the loop. Nobody should call this function multiple times.https://github.com/browsermt/mts/blob/d9aa0c50f56e91c83e53449ce197d337301af3df/src/bergamot/batch_translator.cpp#L113
Also, the use of atomic suggests it is meant to be manipulated from multiple threads. When this is really only a local variable.