Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::EditorPythonEventsInterface Class Referenceabstract

Interface to signal the phases for the Python virtual machine. More...

#include <EditorPythonConsoleBus.h>

Public Member Functions

 AZ_RTTI (EditorPythonEventsInterface, "{F50AE641-2C80-4E07-B4B3-7CB34FFAB393}")
 
virtual bool StartPython (bool silenceWarnings=false)=0
 Signal the Python handler to start.
 
virtual bool StopPython (bool silenceWarnings=false)=0
 Signal the Python handler to stop.
 
virtual bool IsPythonActive ()=0
 Query to determine if the Python VM has been initialized indicating an active state.
 
virtual void WaitForInitialization ()
 Determines if the caller needs to wait for the Python VM to initialize (non-main thread only)
 
virtual void ExecuteWithLock (AZStd::function< void()> executionCallback)=0
 Acquires the Python global interpreter lock (GIL) and execute the callback.
 
virtual bool TryExecuteWithLock (AZStd::function< void()> executionCallback)=0
 

Protected Member Functions

 EditorPythonEventsInterface (EditorPythonEventsInterface &&)=delete
 
EditorPythonEventsInterfaceoperator= (EditorPythonEventsInterface &&)=delete
 

Detailed Description

Interface to signal the phases for the Python virtual machine.

Member Function Documentation

◆ TryExecuteWithLock()

virtual bool AzToolsFramework::EditorPythonEventsInterface::TryExecuteWithLock ( AZStd::function< void()>  executionCallback)
pure virtual

Tries to acquire the Python global interpreter lock (GIL) and execute the callback.

Returns
Whether it was able to lock the mutex or not.

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