From ee90c2cd05c8bc309bab2a42aa6a99ba79bb72bc Mon Sep 17 00:00:00 2001 From: Rahul Kesharwani <42969463+rahulKQL@users.noreply.github.com> Date: Sat, 1 Feb 2020 03:14:48 +0530 Subject: [PATCH] chore:add javadoc about being called within single thread (#856) * chore:add javadoc about being called within single thread * rephrased the words * Updated with feedback comment * removed extra whitespace --- gax/src/main/java/com/google/api/gax/batching/Batcher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gax/src/main/java/com/google/api/gax/batching/Batcher.java b/gax/src/main/java/com/google/api/gax/batching/Batcher.java index 58aa863e5..f8d136650 100644 --- a/gax/src/main/java/com/google/api/gax/batching/Batcher.java +++ b/gax/src/main/java/com/google/api/gax/batching/Batcher.java @@ -38,6 +38,9 @@ * when triggered by an internal threshold. This is intended to be used for high throughput * scenarios at the cost of latency. * + *

Batcher instances are not thread safe. To use across different threads, create a new Batcher + * instance per thread. + * * @param The type of each individual element to be batched. * @param The type of the result for each individual element. */