From fce76b3776472b1da798df862a3405e659e35bab Mon Sep 17 00:00:00 2001 From: HemangChothani <50404902+HemangChothani@users.noreply.github.com> Date: Mon, 15 Jun 2020 14:10:27 +0530 Subject: [PATCH] docs(bigquery): add client thread-safety documentation (#132) * docs(bigquery): add client thread-safety documentation * docs(bigquery): nit * docs(bigquery): nit --- docs/index.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index ec360de69..62a82e0e9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,14 @@ .. include:: README.rst +.. note:: + + Because the BigQuery client uses the third-party :mod:`requests` library + by default and the BigQuery-Storage client uses :mod:`grpcio` library, + both 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`. + More Examples ~~~~~~~~~~~~~