We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19241b2 commit f6a9d07Copy full SHA for f6a9d07
sdk/eventhub/azure-eventhub/azure/eventhub/_buffered_producer/_buffered_producer_dispatcher.py
@@ -51,7 +51,9 @@ def __init__(
51
self._amqp_transport = amqp_transport
52
53
if not executor:
54
- self._executor = ThreadPoolExecutor()
+ # set max workers to the number of partitions & one for the close operation.
55
+ max_workers: int = len(self._partition_ids) + 1
56
+ self._executor = ThreadPoolExecutor(max_workers=max_workers)
57
elif isinstance(executor, ThreadPoolExecutor):
58
self._existing_executor = True
59
self._executor = executor
0 commit comments