Skip to content

Commit

Permalink
docs: clarify that Schedulers shouldn't be used with multiple Subscri…
Browse files Browse the repository at this point in the history
…berClients (googleapis#100)
  • Loading branch information
pradn committed May 15, 2020
1 parent ebf83ec commit cf9e87c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion google/cloud/pubsub_v1/subscriber/client.py
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion google/cloud/pubsub_v1/subscriber/scheduler.py
Expand Up @@ -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.
Expand Down

0 comments on commit cf9e87c

Please sign in to comment.