Skip to content

Commit 6434c47

Browse files
authored
Merge pull request #613 from atlanhq/APP-6379
[req-changes] Renamed method name to `init_for_multithreading` for more clarity
2 parents 7ddb1c4 + 5b2d845 commit 6434c47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyatlan/client/atlan.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@ class Config:
191191
env_prefix = "atlan_"
192192

193193
@classmethod
194-
def init_for_thread(cls, client: AtlanClient):
194+
def init_for_multithreading(cls, client: AtlanClient):
195195
"""
196-
Prepares the given client for use in the current thread.
196+
Prepares the given client for use in multi-threaded environments.
197197
198-
Sets the thread-local context and
199-
resets internal retry flags for multi-threaded environments.
198+
This sets the thread-local context and resets internal retry flags
199+
to ensure correct behavior when using the client across multiple threads.
200200
"""
201201
AtlanClient.set_current_client(client)
202202
client._401_tls.has_retried = False
@@ -233,7 +233,7 @@ def __init__(self, **data):
233233
adapter = HTTPAdapter(max_retries=self.retry)
234234
session.mount(HTTPS_PREFIX, adapter)
235235
session.mount(HTTP_PREFIX, adapter)
236-
AtlanClient.init_for_thread(self)
236+
AtlanClient.init_for_multithreading(self)
237237

238238
@property
239239
def admin(self) -> AdminClient:

0 commit comments

Comments
 (0)