From f529558871d21399244e6eee5b371d48d5249920 Mon Sep 17 00:00:00 2001 From: Tony Le Date: Mon, 6 Jul 2026 10:30:17 -0400 Subject: [PATCH 1/2] doc(taskbroker_client): better docstring for apply_async_with_future --- clients/python/src/taskbroker_client/task.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/python/src/taskbroker_client/task.py b/clients/python/src/taskbroker_client/task.py index ba84762d..7db332e3 100644 --- a/clients/python/src/taskbroker_client/task.py +++ b/clients/python/src/taskbroker_client/task.py @@ -208,8 +208,11 @@ def apply_async_with_future( **options: Any, ) -> ProducerFuture | None: """ - Schedule a task and return the producer future for callers that need to - wait on delivery alongside other Kafka produces. + Schedule a task and return the producer future. + + This does not wait for delivery. Callers that need delivery confirmation + must wait on the returned future themselves. Callers that do not need the + future should use apply_async(). """ activation, args, kwargs = self._create_activation_for_async_dispatch( args=args, kwargs=kwargs, headers=headers, expires=expires, countdown=countdown From 948b189cc48462e032ae78ef7a14bca332e79c6c Mon Sep 17 00:00:00 2001 From: Tony Le Date: Mon, 6 Jul 2026 10:38:25 -0400 Subject: [PATCH 2/2] clarify that produce still happens --- clients/python/src/taskbroker_client/task.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/python/src/taskbroker_client/task.py b/clients/python/src/taskbroker_client/task.py index 7db332e3..67d68d5f 100644 --- a/clients/python/src/taskbroker_client/task.py +++ b/clients/python/src/taskbroker_client/task.py @@ -212,7 +212,9 @@ def apply_async_with_future( This does not wait for delivery. Callers that need delivery confirmation must wait on the returned future themselves. Callers that do not need the - future should use apply_async(). + future should use apply_async(). Ignoring the returned future does not + cancel or prevent the produce; the task activation has already been + handed to the producer. """ activation, args, kwargs = self._create_activation_for_async_dispatch( args=args, kwargs=kwargs, headers=headers, expires=expires, countdown=countdown