browsermt / mts

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

Make thread_ a direct member variable of BatchTranslator #18

Closed kpu closed 3 years ago

kpu commented 3 years ago

If it can be a direct member variable it should be.

Also, there's no need for the if statements because it's the constructor.

https://github.com/browsermt/mts/blob/d9aa0c50f56e91c83e53449ce197d337301af3df/src/bergamot/batch_translator.cpp#L8-L13

jerinphilip commented 3 years ago

thread_ is now member variable.

https://github.com/browsermt/mts/blob/b30809f0af85760a701cde7f2d5910b0b6b74abd/src/bergamot/batch_translator.h#L48

https://github.com/browsermt/mts/blob/b30809f0af85760a701cde7f2d5910b0b6b74abd/src/bergamot/batch_translator.cpp#L12