From 1449589e8b5b9037dae4e9b071ff7e7662992e18 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Fri, 1 May 2020 11:00:07 -0700 Subject: [PATCH] docs: add note about multiprocessing usage (#26) --- docs/index.rst | 7 +++++++ noxfile.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 8c76f79b8..88d8e09ec 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,12 @@ .. include:: README.rst +.. note:: + + Because this client uses :mod:`grpcio` library, it is safe to + share instances across threads. In multiprocessing scenarios, the best + practice is to create client instances *after* the invocation of + :func:`os.fork` by :class:`multiprocessing.Pool` or + :class:`multiprocessing.Process`. Using the API ------------- diff --git a/noxfile.py b/noxfile.py index 3bca8a099..1065894e6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -141,7 +141,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run(