diff --git a/google/cloud/pubsub_v1/subscriber/client.py b/google/cloud/pubsub_v1/subscriber/client.py index 718e69083..00c8f2498 100644 --- a/google/cloud/pubsub_v1/subscriber/client.py +++ b/google/cloud/pubsub_v1/subscriber/client.py @@ -223,7 +223,8 @@ def callback(message): inundated with too many messages at once. scheduler (~google.cloud.pubsub_v1.subscriber.scheduler.Scheduler): An optional *scheduler* to use when executing the callback. This controls - how callbacks are executed concurrently. + how callbacks are executed concurrently. This object must not be shared + across multiple SubscriberClients. Returns: A :class:`~google.cloud.pubsub_v1.subscriber.futures.StreamingPullFuture` diff --git a/google/cloud/pubsub_v1/subscriber/scheduler.py b/google/cloud/pubsub_v1/subscriber/scheduler.py index 42674c824..ef2ef59cb 100644 --- a/google/cloud/pubsub_v1/subscriber/scheduler.py +++ b/google/cloud/pubsub_v1/subscriber/scheduler.py @@ -74,7 +74,8 @@ def _make_default_thread_pool_executor(): class ThreadScheduler(Scheduler): - """A thread pool-based scheduler. + """A thread pool-based scheduler. It must not be shared across + SubscriberClients. This scheduler is useful in typical I/O-bound message processing.