.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BSON_CONTEXT_NEW" "3" "Apr 02, 2024" "1.26.2" "libbson" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bson_context_t * bson_context_new (bson_context_flags_t flags); .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBflags\fP: A \fI\%bson_context_flags_t\fP\&. .UNINDENT .sp The following \fBflags\fP may be used: * \fBBSON_CONTEXT_NONE\fP meaning creating ObjectIDs with this context is not a thread\-safe operation. * \fBBSON_CONTEXT_DISABLE_PID_CACHE\fP meaning creating ObjectIDs will also check if the process has changed by calling \fBgetpid()\fP on every ObjectID generation. .sp The following flags are deprecated and have no effect: .INDENT 0.0 .IP \(bu 2 \fBBSON_CONTEXT_DISABLE_HOST_CACHE\fP .IP \(bu 2 \fBBSON_CONTEXT_THREAD_SAFE\fP .IP \(bu 2 \fBBSON_CONTEXT_USE_TASK_ID\fP .UNINDENT .SH DESCRIPTION .sp Creates a new \fI\%bson_context_t\fP\&. This is rarely needed as \fI\%bson_context_get_default()\fP serves most use\-cases. .SH RETURNS .sp A newly allocated \fI\%bson_context_t\fP that should be freed with \fI\%bson_context_destroy()\fP\&. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .