mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +03:00
Improving abort error message.
This commit is contained in:
parent
9ead41d879
commit
7c14b737a4
@ -11,8 +11,9 @@ namespace bergamot {
|
||||
Service::Service(Ptr<Options> options)
|
||||
: ServiceBase(options), numWorkers_(options->get<int>("cpu-threads")),
|
||||
pcqueue_(numWorkers_) {
|
||||
if (numWorkers_ <= 0) {
|
||||
ABORT("Fatal: numWorkers should be greater than 1");
|
||||
if (numWorkers_ == 0) {
|
||||
ABORT("Fatal: Attempt to create multithreaded instance with --cpu-threads "
|
||||
"0. ");
|
||||
}
|
||||
|
||||
translators_.reserve(numWorkers_);
|
||||
|
Loading…
Reference in New Issue
Block a user