From 09c48461232ce929c34386259eb59018ad2d8eef Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Tue, 5 May 2020 10:06:52 -0700 Subject: [PATCH] chore(python): create thread_safety doc (#517) This will be included in index.rst files. See https://github.com/googleapis/python-bigtable/pull/26/files --- .../gcp/templates/python_library/docs/multiprocessing.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 synthtool/gcp/templates/python_library/docs/multiprocessing.rst diff --git a/synthtool/gcp/templates/python_library/docs/multiprocessing.rst b/synthtool/gcp/templates/python_library/docs/multiprocessing.rst new file mode 100644 index 000000000..1cb29d4ca --- /dev/null +++ b/synthtool/gcp/templates/python_library/docs/multiprocessing.rst @@ -0,0 +1,7 @@ +.. 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`.