You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. note::
Becuase the :class:`~google.cloud.storage.client.Client` uses the
third-party :mod:`requests` library by default, it should be safe to
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`.
Activity
tseaver commentedon Jul 25, 2018
google-cloud-storagehas been based onrequestssince #3674, released withgoogle-cloud-storage 1.3.0just about a year ago.I'm leaving this open as a docs bug so that we add a note to that effect.
BrandonY commentedon Jul 25, 2018
Sorry, you last me. Does being based on
requestsimply thatgoogle-cloud-storageis thread-safe, and the code example above should work fine?tseaver commentedon Jul 26, 2018
Yes to both questions.
tseaver commentedon Aug 7, 2018
@BrandonY Here is the text I am planning to add to the
clientpage:Does that address your need?
tseaver commentedon Aug 7, 2018
@BrandonY Please follow up via #5763, if needed.
Storage: document thread-safety of client. (#5763)