mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-03 05:01:39 +00:00
docs: show nogil in most examples (#5770)
Created using [mini-swe-agent](https://mini-swe-agent.com) and the propmt: I'd like to find usages of PYBIND11_MODULE in the docs folder and add py::mod_gil_not_used() as a third argument if there ar e only two arguments. These are examples, and it's really a good idea to always include that now. I removed a few of the changes. Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -217,7 +217,7 @@ expects the type followed by field names:
|
||||
};
|
||||
|
||||
// ...
|
||||
PYBIND11_MODULE(test, m) {
|
||||
PYBIND11_MODULE(test, m, py::mod_gil_not_used()) {
|
||||
// ...
|
||||
|
||||
PYBIND11_NUMPY_DTYPE(A, x, y);
|
||||
@@ -351,7 +351,7 @@ simply using ``vectorize``).
|
||||
return result;
|
||||
}
|
||||
|
||||
PYBIND11_MODULE(test, m) {
|
||||
PYBIND11_MODULE(test, m, py::mod_gil_not_used()) {
|
||||
m.def("add_arrays", &add_arrays, "Add two NumPy arrays");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user