mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +03:00
Changing fn name from enqueue to produceTo(pcqueue)
This commit is contained in:
parent
45a8309c69
commit
ca6ca154b9
@ -62,7 +62,7 @@ void Batcher::addWholeRequest(Ptr<Request> request) {
|
||||
}
|
||||
}
|
||||
|
||||
void Batcher::enqueue(PCQueue<Batch> &pcqueue) {
|
||||
void Batcher::produceTo(PCQueue<Batch> &pcqueue) {
|
||||
Batch batch;
|
||||
while (cleaveBatch(batch)) {
|
||||
pcqueue.ProduceSwap(batch);
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
// which maintains priority among sentences from multiple concurrent requests.
|
||||
void addSentenceWithPriority(RequestSentence &sentence);
|
||||
void addWholeRequest(Ptr<Request> request);
|
||||
void enqueue(PCQueue<Batch> &pcqueue);
|
||||
void produceTo(PCQueue<Batch> &pcqueue);
|
||||
|
||||
// Loads sentences with sentences compiled from (tentatively) multiple
|
||||
// requests optimizing for both padding and priority.
|
||||
|
@ -70,7 +70,7 @@ std::future<Response> Service::translate(std::string &&input) {
|
||||
batcher_.addWholeRequest(request);
|
||||
|
||||
if (numWorkers_ > 0) {
|
||||
batcher_.enqueue(pcqueue_);
|
||||
batcher_.produceTo(pcqueue_);
|
||||
} else {
|
||||
// Queue single-threaded
|
||||
Batch batch;
|
||||
|
Loading…
Reference in New Issue
Block a user