MCPcopy Create free account
hub / github.com/pybind/pybind11 / multiple_interpreters

Class multiple_interpreters

include/pybind11/pybind11.h:1444–1465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1442};
1443
1444class multiple_interpreters {
1445public:
1446 enum class level {
1447 not_supported, /// Use to activate Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED
1448 shared_gil, /// Use to activate Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED
1449 per_interpreter_gil /// Use to activate Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
1450 };
1451
1452 static multiple_interpreters not_supported() {
1453 return multiple_interpreters(level::not_supported);
1454 }
1455 static multiple_interpreters shared_gil() { return multiple_interpreters(level::shared_gil); }
1456 static multiple_interpreters per_interpreter_gil() {
1457 return multiple_interpreters(level::per_interpreter_gil);
1458 }
1459
1460 explicit constexpr multiple_interpreters(level l) : level_(l) {}
1461 level value() const { return level_; }
1462
1463private:
1464 level level_;
1465};
1466
1467PYBIND11_NAMESPACE_BEGIN(detail)
1468

Callers 3

not_supportedMethod · 0.85
shared_gilMethod · 0.85
per_interpreter_gilMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected