Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
dcn::async Namespace Reference

Classes

class  SignalWorker
 

Functions

asio::awaitable< void > watchdog (std::chrono::steady_clock::time_point &deadline)
 Suspends the coroutine until the given deadline is reached.
 
asio::awaitable< void > ensureOnStrand (const asio::strand< asio::io_context::executor_type > &strand)
 

Function Documentation

◆ ensureOnStrand()

asio::awaitable< void > dcn::async::ensureOnStrand ( const asio::strand< asio::io_context::executor_type > &  strand)

◆ watchdog()

asio::awaitable< void > dcn::async::watchdog ( std::chrono::steady_clock::time_point &  deadline)

Suspends the coroutine until the given deadline is reached.

Parameters
deadlineThe point in time when the coroutine should be resumed

This function is used to implement a watchdog like behavior in the server. It is used for example in the listening function to periodically check if the server should be shut down.