RADLib
RADical C++ application framework
RADCore::EventLoopHandle Class Reference

Weak posting handle for EventLoop tasks that may outlive the loop object. More...

#include <RADCore.h>

Public Member Functions

 EventLoopHandle ()=default
 Creates an invalid handle. More...
 
bool isValid () const
 Returns true when the referenced loop still accepts work. More...
 
bool post (Priority priority, EventLoop::Task task) const
 Posts task with explicit priority; returns false when the loop is gone. More...
 
bool post (EventLoop::Task task) const
 Posts normal-priority task; returns false when the loop is gone. More...
 
bool postDelayed (int delayMs, EventLoop::Task task) const
 Posts task after delayMs milliseconds; returns false when the loop is gone. More...
 

Friends

class EventLoop
 

Detailed Description

Weak posting handle for EventLoop tasks that may outlive the loop object.

Constructor & Destructor Documentation

◆ EventLoopHandle()

RADCore::EventLoopHandle::EventLoopHandle ( )
default

Creates an invalid handle.

Member Function Documentation

◆ isValid()

bool RADCore::EventLoopHandle::isValid ( ) const

Returns true when the referenced loop still accepts work.

◆ post() [1/2]

bool RADCore::EventLoopHandle::post ( EventLoop::Task  task) const

Posts normal-priority task; returns false when the loop is gone.

◆ post() [2/2]

bool RADCore::EventLoopHandle::post ( Priority  priority,
EventLoop::Task  task 
) const

Posts task with explicit priority; returns false when the loop is gone.

◆ postDelayed()

bool RADCore::EventLoopHandle::postDelayed ( int  delayMs,
EventLoop::Task  task 
) const

Posts task after delayMs milliseconds; returns false when the loop is gone.

Friends And Related Function Documentation

◆ EventLoop

friend class EventLoop
friend

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