Skip to content

Commit

Permalink
add locks
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aalam committed Sep 11, 2024
1 parent 7d54d20 commit fb4ecf6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/snowflake/snowpark/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import re
import sys
import tempfile
import threading
import warnings
from array import array
from functools import reduce
Expand Down Expand Up @@ -499,6 +500,8 @@ def __init__(
if len(_active_sessions) >= 1 and is_in_stored_procedure():
raise SnowparkClientExceptionMessages.DONT_CREATE_SESSION_IN_SP()
self._conn = conn
self._thread_store = threading.local()
self._lock = threading.RLock()
self._query_tag = None
self._import_paths: Dict[str, Tuple[Optional[str], Optional[str]]] = {}
self._packages: Dict[str, str] = {}
Expand Down

0 comments on commit fb4ecf6

Please sign in to comment.