1MONGOC_CLIENT_POOL_POP(3)          libmongoc         MONGOC_CLIENT_POOL_POP(3)
2
3
4

SYNOPSIS

6          mongoc_client_t *
7          mongoc_client_pool_pop (mongoc_client_pool_t *pool)
8             BSON_GNUC_WARN_UNUSED_RESULT;
9
10       Retrieve a mongoc_client_t from the client pool, or create one. The to‐
11       tal number of clients that can be created from this pool is limited  by
12       the  URI  option  "maxPoolSize", default 100. If this number of clients
13       has been created and all are in use, mongoc_client_pool_pop blocks  un‐
14       til  another thread returns a client with mongoc_client_pool_push(). If
15       the "waitQueueTimeoutMS" URI  option  was  specified  with  a  positive
16       value,  then  mongoc_client_pool_pop  will return NULL when the timeout
17       expires.
18
19       The  returned  mongoc_client_t  must  be  returned  to  the  pool  with
20       mongoc_client_pool_push().
21

PARAMETERS

23pool: A mongoc_client_pool_t.
24

RETURNS

26       A mongoc_client_t.
27

THREAD SAFETY

29       This function is safe to call from multiple threads.
30

AUTHOR

32       MongoDB, Inc
33
35       2017-present, MongoDB, Inc
36
37
38
39
401.25.1                           Nov 08, 2023        MONGOC_CLIENT_POOL_POP(3)
Impressum