Skip to content

Commit

Permalink
chore: add warning comment to confluent client
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Dec 30, 2024
1 parent e4d6e65 commit 5bced11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions faststream/confluent/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ async def stop(self) -> None:
)

# Wrap calls to async to make method cancelable by timeout
# We shouldn't read messages and close consumer concurrently
# https://github.com/airtai/faststream/issues/1904#issuecomment-2506990895
# Now it works withouth lock due `ThreadPoolExecutor(max_workers=1)`
# that makes all calls to consumer sequential
await run_in_executor(self._thread_pool, self.consumer.close)

self._thread_pool.shutdown(wait=False)
Expand Down

0 comments on commit 5bced11

Please sign in to comment.