|
rogue
|
RAII helper that releases the Python GIL for a scope. More...
#include <GilRelease.h>
Public Member Functions | |
| GilRelease () | |
| Constructs and releases the GIL for this scope. | |
| ~GilRelease () | |
| Re-acquires the GIL if currently released. | |
| void | acquire () |
| Re-acquires the GIL explicitly. | |
| void | release () |
| Releases the GIL explicitly. | |
RAII helper that releases the Python GIL for a scope.
Constructing this object releases the GIL (when Python is enabled), allowing blocking or long-running C++ work to proceed without stalling other Python threads. Destruction re-acquires the GIL.
Definition at line 36 of file GilRelease.h.
| rogue::GilRelease::GilRelease | ( | ) |
Constructs and releases the GIL for this scope.
Description:
This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms
Definition at line 28 of file GilRelease.cpp.
| rogue::GilRelease::~GilRelease | ( | ) |
Re-acquires the GIL if currently released.
Definition at line 35 of file GilRelease.cpp.
| void rogue::GilRelease::acquire | ( | ) |
Re-acquires the GIL explicitly.
Definition at line 41 of file GilRelease.cpp.
| void rogue::GilRelease::release | ( | ) |
Releases the GIL explicitly.
Definition at line 48 of file GilRelease.cpp.