1MONGOC_CLIENT_POOL_POP(3) libmongoc MONGOC_CLIENT_POOL_POP(3)
2
3
4
6 mongoc_client_pool_pop - mongoc_client_pool_pop()
7
9 mongoc_client_t *
10 mongoc_client_pool_pop (mongoc_client_pool_t *pool);
11
12 Retrieve a mongoc_client_t from the client pool, or create one. The to‐
13 tal number of clients that can be created from this pool is limited by
14 the URI option "maxPoolSize", default 100. If this number of clients
15 has been created and all are in use, mongoc_client_pool_pop blocks un‐
16 til another thread returns a client with mongoc_client_pool_push(). If
17 the "waitQueueTimeoutMS" URI option was specified with a positive
18 value, then mongoc_client_pool_pop will return NULL when the timeout
19 expires.
20
21 The returned mongoc_client_t must be returned to the pool with mon‐
22 goc_client_pool_push().
23
25 • pool: A mongoc_client_pool_t.
26
28 A mongoc_client_t.
29
31 This function is safe to call from multiple threads.
32
34 MongoDB, Inc
35
37 2017-present, MongoDB, Inc
38
39
40
41
421.17.6 Jun 03, 2021 MONGOC_CLIENT_POOL_POP(3)