CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace thread {
class IoThreadPool; } }
27 namespace catapult {
namespace thread {
50 std::shared_ptr<Scheduler>
CreateScheduler(
const std::shared_ptr<IoThreadPool>& pPool);
#define CATAPULT_THROW_EXCEPTION(EXCEPTION)
Macro used to throw a catapult exception.
Definition: exceptions.h:142
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
std::atomic< uint32_t > m_numExecutingTaskCallbacks
Definition: Scheduler.cpp:207
utils::WeakContainer< StrandedTaskWrapper > m_tasks
Definition: Scheduler.cpp:209
boost::asio::io_context & m_ioContext
Definition: Scheduler.cpp:205
def debug(*args)
Definition: Parser.py:46
virtual void addTask(const Task &task)=0
Adds a scheduled task to the scheduler.
StrandOwnerLifetimeExtender< StrandedTaskWrapper > m_strandWrapper
Definition: Scheduler.cpp:144
def warning(*args)
Definition: colorPrint.py:10
auto compose(future< TSeed > &&startFuture, TCreateNextFuture createNextFuture)
Definition: FutureUtils.h:102
Task m_task
Definition: Scheduler.cpp:94
virtual ~Scheduler()=default
BasicTaskWrapper< StrandedTaskWrapper > m_impl
Definition: Scheduler.cpp:145
A scheduler.
Definition: Scheduler.h:30
virtual void shutdown()=0
Shuts down the scheduler.
virtual uint32_t numScheduledTasks() const =0
Gets the number of tasks that are currently either scheduled or executing.
bool m_isStopped
Definition: Scheduler.cpp:97
DECLARE_SERVICE_REGISTRAR() Scheduler(const TasksConfiguration &config)
Definition: SchedulerService.cpp:86
def info(*args)
Definition: forwardsValidation.py:12
virtual uint32_t numExecutingTaskCallbacks() const =0
Gets the number of currently executing task callbacks.
TaskResult
Result of a task.
Definition: Task.h:30
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
Definition: AddressExtractionExtension.cpp:28
boost::asio::io_context::strand m_strand
Definition: Scheduler.cpp:143
std::shared_ptr< Scheduler > CreateScheduler(const std::shared_ptr< IoThreadPool > &pPool)
Creates a scheduler around the specified thread pool (pPool).
Definition: Scheduler.cpp:213
TCallbackWrapper & m_wrapper
Definition: Scheduler.cpp:95
std::shared_ptr< const IoThreadPool > m_pPool
Definition: Scheduler.cpp:204
boost::asio::steady_timer m_timer
Definition: Scheduler.cpp:96
A task that can be dispatched to the scheduler.
Definition: Task.h:45