browsermt / mts

Marian Translation Service
Apache License 2.0
18 stars 4 forks source link

Removing running_ variable from BatchTranslator #17

Closed kpu closed 3 years ago

kpu commented 3 years ago

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.