You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//document that if a task is already executing it will complete before sleeping.
//if a task wants to determine at runtime if it is suspended it may call is_suspended( );
void RunLoop::suspend( void )
// Note if you have tasks with unmet conditions via launch_if and/or launch_at. the loop::wait method
// will block until successful completion of all tasks.
//This function may block for longer than timeout_duration due to scheduling or resource contention delays.
error_code RunLoop::wait( const milliseconds& duration )
//cancel tasks that have not yet executed.
void RunLoop::cancel( const string& key )
/*
* Note that when a sighandler is running you may miss other signals of the same number until
* your handler has finished. that is to state a signal handler for a specific signum is
* no able to run consecutively, you can't have the same handler running concurrently.
* if you throw an exception from a handler you will need to reschedule the handler yourself!
*/
void RunLoop::launch_on( const signal_t value, const function< error_code ( void ) >& task, const string& key )
void RunLoop::set_log_handler( const function< error_code ( const string&, const error_code&, const string& ) >& value )
{
suspend( ); //document me on api, this is bad unless suspend waits fro all takes to sleep.
m_pimpl->log_handler = value;
resume( );
}
void RunLoop::set_error_handler( const function< error_code ( const string&, const error_code&, const string& ) >& value )
{
suspend( ); //doc me, this is bad unless suspend waits fro all takes to sleep.
m_pimpl->error_handler = value;
resume( );
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: