MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _create_lock

Function _create_lock

pymongo/lock.py:46–53  ·  view source on GitHub ↗

Represents a lock that is tracked upon instantiation using a WeakSet and reset by pymongo upon forking.

()

Source from the content-addressed store, hash-verified

44
45
46def _create_lock() -> threading.Lock:
47 """Represents a lock that is tracked upon instantiation using a WeakSet and
48 reset by pymongo upon forking.
49 """
50 lock = threading.Lock()
51 if _HAS_REGISTER_AT_FORK:
52 _forkable_locks.add(lock)
53 return lock
54
55
56def _async_create_lock() -> Lock:

Callers 11

test_max_pool_sizeMethod · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls 1

addMethod · 0.80

Tested by 2

test_max_pool_sizeMethod · 0.72