diff options
author | Dana Powers <dana.powers@rd.io> | 2015-06-08 17:25:45 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2015-06-08 18:59:23 -0700 |
commit | 0dc6663d24f6b9386ac2119a4a11836391e5da65 (patch) | |
tree | 47a2fa30bfa32a4714c74afa2989944bcb86e56a /kafka/conn.py | |
parent | c0fb0de7c4ced45dae4e09cdc660ebc741e11af3 (diff) | |
download | kafka-python-0dc6663d24f6b9386ac2119a4a11836391e5da65.tar.gz |
Add a few extra docstring comments about thread-safe clients/connections
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 7a49d8c..432e10b 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -161,9 +161,11 @@ class KafkaConnection(local): def copy(self): """ - Create an inactive copy of the connection object - A reinit() has to be done on the copy before it can be used again - return a new KafkaConnection object + Create an inactive copy of the connection object, suitable for + passing to a background thread. + + The returned copy is not connected; you must call reinit() before + using. """ c = copy.deepcopy(self) # Python 3 doesn't copy custom attributes of the threadlocal subclass |