MONGOC_CLIENT_POOL_TRY_POP(3)
β¨ MONGOC_CLIENT_POOL_TRY_POP(3) β¨
okay bestie, welcome to the MONGOC_CLIENT_POOL_TRY_POP(3) page from the libmongoc manual π
this one is short and sweet and honestly kind of iconic.
πΈ SYNOPSIS πΈ
mongoc_client_t *
mongoc_client_pool_try_pop (mongoc_client_pool_t *pool);
π¦ DESCRIPTION π¦
so this function is literally identical to mongoc_client_pool_pop() β same energy, same everything β EXCEPT π it won't sit there blocking forever waiting for a client to free up. Instead it just goes NULL and moves on. no cap, it's the "if it's not available I'm not waiting around" friend π«Ά
NOTE: give that checked outmongoc_client_tback to the pool withmongoc_client_pool_push()quickly so clients keep getting reused between threads π« like please don't hoard it, sharing is caring π
π PARAMETERS π
poolβ amongoc_client_pool_t. that's it, that's the parameter π
β RETURNS β
a mongoc_client_t if one is immediately available π otherwise NULL β the vibes were simply not there π
π THREAD SAFETY π
totally safe to call from multiple threads at once, fr fr β¨ go off, multi-threaded queens π₯
π AUTHOR π
MongoDB, Inc β the main characters π§
π COPYRIGHT π
2009-present, MongoDB, Inc. β slay, periodt π
and that's the whole page, bestie!! this gorgeous little doc dropped as version 2.5.6 on Oct 09, 2026 π« k-thanks-bye, go push your clients back to the pool π¦π
π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms