Changing fn name from enqueue to produceTo(pcqueue)

This commit is contained in:
Jerin Philip 2021-02-15 15:22:31 +00:00
parent 45a8309c69
commit ca6ca154b9
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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.

View File

@ -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;