UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::EventLoop::IEventLoop Class Referenceabstract

#include <IEventLoop.h>

+ Inheritance diagram for UE::EventLoop::IEventLoop:

Public Member Functions

virtual ~IEventLoop ()=default
 
virtual bool Init ()=0
 
virtual void RequestShutdown (FOnShutdownComplete &&OnShutdownComplete=FOnShutdownComplete())=0
 
virtual FTimerHandle SetTimer (FTimerCallback &&Callback, FTimespan InRate, bool InbRepeat=false, TOptional< FTimespan > InFirstDelay=TOptional< FTimespan >())=0
 
virtual void ClearTimer (FTimerHandle &InHandle, FOnTimerCleared &&OnTimerCleared=FOnTimerCleared())=0
 
virtual void PostAsyncTask (FAsyncTask &&Task)=0
 
virtual void Run ()=0
 
virtual bool RunOnce (FTimespan WaitTime)=0
 
virtual FTimespan GetLoopTime () const =0
 
- Public Member Functions inherited from TSharedFromThis< IEventLoop, ESPMode::ThreadSafe >
TSharedRef< IEventLoop, Mode > AsShared ()
 
TSharedRef< IEventLoop const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< IEventLoop, Mode > AsWeak ()
 
TWeakPtr< IEventLoop const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< IEventLoop, ESPMode::ThreadSafe >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< IEventLoop, ESPMode::ThreadSafe >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Constructor & Destructor Documentation

◆ ~IEventLoop()

virtual UE::EventLoop::IEventLoop::~IEventLoop ( )
virtualdefault

Member Function Documentation

◆ ClearTimer()

virtual void UE::EventLoop::IEventLoop::ClearTimer ( FTimerHandle InHandle,
FOnTimerCleared &&  OnTimerCleared = FOnTimerCleared() 
)
pure virtual

Clears a previously set timer.

Thread safe.

Parameters
InHandleThe handle of the timer to clear.
OnTimerClearedCallback to be fired when the timer has been removed. The callback will be fired from within the event loops RunOnce method.

Implemented in UE::EventLoop::TEventLoop< IOManagerType, Traits >, and UE::EventLoop::TEventLoop< FAppleHTTPIOManager >.

◆ GetLoopTime()

virtual FTimespan UE::EventLoop::IEventLoop::GetLoopTime ( ) const
pure virtual

◆ Init()

virtual bool UE::EventLoop::IEventLoop::Init ( )
pure virtual

Initialize the event loop.

NOT thread safe.

Implemented in UE::EventLoop::TEventLoop< IOManagerType, Traits >, and UE::EventLoop::TEventLoop< FAppleHTTPIOManager >.

◆ PostAsyncTask()

virtual void UE::EventLoop::IEventLoop::PostAsyncTask ( FAsyncTask &&  Task)
pure virtual

Post a task to be run by the event loop. Queues the task to be run and signals the event loop to wake.

Thread safe.

Parameters
TaskThe task to be run.

Implemented in UE::EventLoop::TEventLoop< IOManagerType, Traits >, and UE::EventLoop::TEventLoop< FAppleHTTPIOManager >.

◆ RequestShutdown()

virtual void UE::EventLoop::IEventLoop::RequestShutdown ( FOnShutdownComplete &&  OnShutdownComplete = FOnShutdownComplete())
pure virtual

Signals a shutdown request to the event loop. May be signaled from any thread. Once Shutdown has been called, continue calling Poll until Invalidates the timer handle as it should no longer be used.

Thread safe.

Implemented in UE::EventLoop::TEventLoop< IOManagerType, Traits >, and UE::EventLoop::TEventLoop< FAppleHTTPIOManager >.

◆ Run()

virtual void UE::EventLoop::IEventLoop::Run ( )
pure virtual

◆ RunOnce()

virtual bool UE::EventLoop::IEventLoop::RunOnce ( FTimespan  WaitTime)
pure virtual

◆ SetTimer()

virtual FTimerHandle UE::EventLoop::IEventLoop::SetTimer ( FTimerCallback &&  Callback,
FTimespan  InRate,
bool  InbRepeat = false,
TOptional< FTimespan InFirstDelay = TOptionalFTimespan >() 
)
pure virtual

Set a new timer. The timer callback will be triggered from within the call to RunOnce, which may occur on a different thread from the one which set the timer.

Thread safe.

Parameters
CallbackCallback to call when timer fires.
InRateThe amount of time between set and firing.
InbRepeattrue to keep firing at Rate intervals, false to fire only once.
InFirstDelayThe time for the first iteration of a looping timer.
Returns
handle to the registered timer.

Implemented in UE::EventLoop::TEventLoop< IOManagerType, Traits >, and UE::EventLoop::TEventLoop< FAppleHTTPIOManager >.


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