rogue
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rogue::GilRelease Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GilRelease()

rogue::GilRelease::GilRelease ( )

Constructs and releases the GIL for this scope.


Company : SLAC National Accelerator Laboratory

Description:

Release GIL for the scope of this class.

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

contained in the LICENSE.txt file.

Definition at line 28 of file GilRelease.cpp.

◆ ~GilRelease()

rogue::GilRelease::~GilRelease ( )

Re-acquires the GIL if currently released.

Definition at line 35 of file GilRelease.cpp.

Member Function Documentation

◆ acquire()

void rogue::GilRelease::acquire ( )

Re-acquires the GIL explicitly.

Definition at line 41 of file GilRelease.cpp.

◆ release()

void rogue::GilRelease::release ( )

Releases the GIL explicitly.

Definition at line 48 of file GilRelease.cpp.


The documentation for this class was generated from the following files: