From e7fb641b031421745b415b3f4c9c7b31b1c7d94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=81ukawski?= Date: Wed, 30 Aug 2023 16:17:43 +0200 Subject: [PATCH] Fix the description of mixing async and sync code --- qdrant-landing/content/documentation/tutorials/async-api.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qdrant-landing/content/documentation/tutorials/async-api.md b/qdrant-landing/content/documentation/tutorials/async-api.md index 4f11c178f..428d9fa74 100644 --- a/qdrant-landing/content/documentation/tutorials/async-api.md +++ b/qdrant-landing/content/documentation/tutorials/async-api.md @@ -21,8 +21,10 @@ blocking the threads of the web server as it limits the number of concurrent req the async API. Modern web frameworks like [FastAPI](https://fastapi.tiangolo.com/) and [Quart](https://quart.palletsprojects.com/en/latest/) support -async API out of the box. Asynchronous code cannot be incorporated into an existing synchronous codebase, so it's better to choose -the proper tool from the start. +async API out of the box. Mixing asynchronous code with an existing synchronous codebase might be a challenge. The `async/await` syntax +cannot be used in synchronous functions. On the other hand, calling an IO-bound operation synchronously in async code is considered +an antipattern. Therefore, if you build an async web service, exposed through an [ASGI](https://asgi.readthedocs.io/en/latest/) server, +you should use the async API for all the interactions with Qdrant. ## How to use async API?