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

Method run_mongo_thread

test/test_pooling.py:117–125  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 self.sock = None
116
117 def run_mongo_thread(self):
118 self.state = "get_socket"
119
120 # Call 'pin_cursor' so we can hold the socket.
121 with self.pool.checkout() as sock:
122 sock.pin_cursor()
123 self.sock = sock
124
125 self.state = "connection"
126
127 def release_conn(self):
128 if self.sock:

Callers

nothing calls this directly

Calls 2

checkoutMethod · 0.45
pin_cursorMethod · 0.45

Tested by

no test coverage detected