Skip to content

Commit ae0339c

Browse files
docs: document thread-safety of client (#75)
1 parent 7df727d commit ae0339c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
.. include:: README.rst
22

3+
.. note::
4+
5+
Because the Datastore client uses the :mod:`grpcio` library by default
6+
and uses third-party :mod:`requests` library if the GRPC is disabled,
7+
clients are safe to share instances across threads. In multiprocessing
8+
scenarios, the best practice is to create client instances *after*
9+
:class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes
10+
:func:`os.fork`.
311

412
API Reference
513
-------------

0 commit comments

Comments
 (0)