Goby3 3.6.1
2026.09.15
Loading...
Searching...
No Matches
goby::middleware::python::detail::SignalGuard Class Reference

Installs the quit-on-signal handlers for the duration of a run() call. More...

#include <goby/middleware/languages/python/application.h>

Public Member Functions

 SignalGuard (void(*quit_fn)(void *), void *quit_ctx)
 
 ~SignalGuard ()
 
 SignalGuard (const SignalGuard &)=delete
 
SignalGuard & operator= (const SignalGuard &)=delete
 

Detailed Description

Installs the quit-on-signal handlers for the duration of a run() call.

This deliberately displaces the Python interpreter's own SIGINT handler while the C++ event loop is running: with the GIL released the interpreter would not act on a KeyboardInterrupt until the next callback, raising it from inside Goby's C++ call stack.

Definition at line 121 of file application.h.

Constructor & Destructor Documentation

◆ SignalGuard() [1/2]

goby::middleware::python::detail::SignalGuard::SignalGuard ( void(*)(void *)  quit_fn,
void *  quit_ctx 
)
inline

Definition at line 124 of file application.h.

◆ ~SignalGuard()

goby::middleware::python::detail::SignalGuard::~SignalGuard ( )
inline

Definition at line 135 of file application.h.

◆ SignalGuard() [2/2]

goby::middleware::python::detail::SignalGuard::SignalGuard ( const SignalGuard &  )
delete

Member Function Documentation

◆ operator=()

SignalGuard & goby::middleware::python::detail::SignalGuard::operator= ( const SignalGuard &  )
delete

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