BSON_CONTEXT_NEW(3)
π BSON_CONTEXT_NEW π
ok so this is a page from libbson, section 3 (library functions, bestie, not a command you type). it's all about making a shiny new bson_context_t β yes that's the whole personality of this page, and honestly? iconic.
β¨ SYNOPSIS β¨
bson_context_t *
bson_context_new (bson_context_flags_t flags);
like, one function, one argument, zero drama π
πΈ PARAMETERS πΈ
flagsβ abson_context_flags_t. that's it, that's the vibe.
here are the flags you can actually use, fr fr:
BSON_CONTEXT_NONEβ meaning creating ObjectIDs with this context is not a thread-safe operation π (yes that's the default energy, be careful bestie)BSON_CONTEXT_DISABLE_PID_CACHEβ meaning creating ObjectIDs will also check if the process has changed by callinggetpid()on every ObjectID generation. every single one. no caching, no shortcuts, we checkin' π₯
and these ones? deprecated, zero effect, they're giving ghost of flags past π»:
BSON_CONTEXT_DISABLE_HOST_CACHEBSON_CONTEXT_THREAD_SAFEBSON_CONTEXT_USE_TASK_ID
lowkey if you're out here passing the deprecated ones, they will simply not do anything. not a vibe check failure, just... nothing. π
π¦ DESCRIPTION π¦
Creates a new bson_context_t. and here's the tea β this is rarely needed, because bson_context_get_default() serves most use-cases. so like, unless you have a real reason, the default one already ate and left no crumbs π
π RETURNS π
A newly allocated bson_context_t that should be freed with bson_context_destroy().
not me reminding you to free it β please don't leak, bestie, that's not main character energy π
π AUTHOR π
MongoDB, Inc β the ones who brought you this whole thing π«Ά
β COPYRIGHT β
2009-present, MongoDB, Inc.
and that's the whole page!! written by the libbson girlies, version 2.5.6, dated Oct 09, 2026 β see you in the next manpage, mwah π§π
π¦ where this page comes from
- epel 10: libbson-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