Realm C++ SDK Version v2.2.0
|
#include <realm_core_scheduler.hpp>
Public Member Functions | |
void | invoke (std::function< void()> &&fn) final |
bool | is_on_thread () const noexcept final |
bool | is_same_as (const scheduler *other) const noexcept final |
bool | can_invoke () const noexcept final |
realm_core_scheduler (std::shared_ptr< util::Scheduler > s) | |
operator std::shared_ptr< util::Scheduler > () | |
virtual void | invoke (std::function< void()> &&)=0 |
virtual bool | is_on_thread () const noexcept=0 |
virtual bool | is_same_as (const scheduler *other) const noexcept=0 |
virtual bool | can_invoke () const noexcept=0 |
A type erased scheduler used for wrapping default scheduler implementations from RealmCore.
|
finalvirtualnoexcept |
Check if this scheduler actually can support invoke(). Invoking may be either not implemented, not applicable to a scheduler type, or simply not be possible currently (e.g. if the associated event loop is not actually running).
This function is not thread-safe.
Implements realm::scheduler.
|
finalvirtual |
Invoke the given function on the scheduler's thread. This function can be called from any thread.
Implements realm::scheduler.
|
finalvirtualnoexcept |
Check if the caller is currently running on the scheduler's thread. This function can be called from any thread.
Implements realm::scheduler.
|
finalvirtualnoexcept |
Checks if this scheduler instance wraps the same underlying instance. This is up to the platforms to define, but if this method returns true, caching may occur.
Implements realm::scheduler.