Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf9e87c

Browse filesBrowse files
authored
docs: clarify that Schedulers shouldn't be used with multiple SubscriberClients (#100)
1 parent ebf83ec commit cf9e87c
Copy full SHA for cf9e87c

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎google/cloud/pubsub_v1/subscriber/client.py‎

Copy file name to clipboardExpand all lines: google/cloud/pubsub_v1/subscriber/client.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ def callback(message):
223223
inundated with too many messages at once.
224224
scheduler (~google.cloud.pubsub_v1.subscriber.scheduler.Scheduler): An optional
225225
*scheduler* to use when executing the callback. This controls
226-
how callbacks are executed concurrently.
226+
how callbacks are executed concurrently. This object must not be shared
227+
across multiple SubscriberClients.
227228
228229
Returns:
229230
A :class:`~google.cloud.pubsub_v1.subscriber.futures.StreamingPullFuture`
Collapse file

‎google/cloud/pubsub_v1/subscriber/scheduler.py‎

Copy file name to clipboardExpand all lines: google/cloud/pubsub_v1/subscriber/scheduler.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def _make_default_thread_pool_executor():
7474

7575

7676
class ThreadScheduler(Scheduler):
77-
"""A thread pool-based scheduler.
77+
"""A thread pool-based scheduler. It must not be shared across
78+
SubscriberClients.
7879
7980
This scheduler is useful in typical I/O-bound message processing.
8081

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.