FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Storage: document thread-safety of client. by tseaver · Pull Request #5763 · googleapis/google-cloud-python · GitHub

Storage: document thread-safety of client. - #5763

Merged
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:5685-storage-document_thread_mp_safety
Aug 20, 2018
Merged

Storage: document thread-safety of client.#5763
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:5685-storage-document_thread_mp_safety

Conversation

tseaver commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

/cc @BrandonY

Also note general best practice for multiprocessing use.

Closes #5685.

Also note general best practice for multiprocessing use.

Closes #5685.
tseaver added documentation api: storage Issues related to the Cloud Storage API. labels Aug 7, 2018
tseaver requested a review from mcdonc August 7, 2018 13:02
tseaver requested a review from theacodes as a code owner August 7, 2018 13:02
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 7, 2018
tseaver requested review from frankyn and removed request for theacodes August 8, 2018 12:33
Comment thread docs/storage/client.rst
share instances across threads. In multiprocessing scenarious, best
practice is to create client instances *after*
:class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes
:func:`os.fork`.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

theacodes commented Aug 14, 2018 via email

Copy link
Copy Markdown
Contributor

tseaver merged commit af8547f into googleapis:master Aug 20, 2018
tseaver deleted the 5685-storage-document_thread_mp_safety branch August 20, 2018 16:01

Copy link
Copy Markdown

I ran into this same question when trying to optimize some Flask code running on GCF/GAE. Is the library written in such a way where we can make a general statement for all the APIs? Or is it really different for each API?

tseaver commented Jun 24, 2019

Copy link
Copy Markdown
Contributor Author

@kaliberto We have two basic groups of APIs: those which use gRPC as their basic transport, and those whic use requests/HTTP. The gRPC-based clients are threadsafe, but not fork-safe; the requests-based clients are as threadsafe as requests (i.e., no known issues).

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document thread-safety of library

5 participants


Back | FazBrowse Home | New Git URL