From ae0339ce94aa8557534e3be24890d7f5a69e806b Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Thu, 17 Sep 2020 01:02:22 +0530 Subject: [PATCH] docs: document thread-safety of client (#75) --- docs/index.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index eed05518..60357e2d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,13 @@ .. include:: README.rst +.. note:: + + Because the Datastore client uses the :mod:`grpcio` library by default + and uses third-party :mod:`requests` library if the GRPC is disabled, + clients are safe to share instances across threads. In multiprocessing + scenarios, the best practice is to create client instances *after* + :class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes + :func:`os.fork`. API Reference -------------