RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | List of all members
rstudio::launcher_plugins::system::AsyncTimedEvent Class Referencefinal

Class which performs an action asynchronously every specified number of seconds. More...

#include <Asio.hpp>

Public Member Functions

 AsyncTimedEvent ()
 Default constructor.
 
void start (const TimeDuration &in_timeDuration, const AsioFunction &in_event)
 Starts performing the specified event every in_timeDuration. More...
 
void cancel ()
 Cancels the timed event.
 
void reportError (const Error &in_error)
 Reports a fatal error to the AsyncTimedEvent instance. Invoking this will cause the timed event to stop running. More...
 

Detailed Description

Class which performs an action asynchronously every specified number of seconds.

Member Function Documentation

◆ reportError()

void rstudio::launcher_plugins::system::AsyncTimedEvent::reportError ( const Error in_error)

Reports a fatal error to the AsyncTimedEvent instance. Invoking this will cause the timed event to stop running.

This method should be invoked by the event passed to start if a fatal error occurs.

Parameters
in_errorThe error which occurred.

◆ start()

void rstudio::launcher_plugins::system::AsyncTimedEvent::start ( const TimeDuration in_timeDuration,
const AsioFunction &  in_event 
)

Starts performing the specified event every in_timeDuration.

This function may only be called once per instance. Restarting a canceled or otherwise stopped timed event will not work. Instead, a new instance should be created and started.

Parameters
in_timeDurationThe amount of time to wait between each event.
in_eventThe action to perform every in_timeDuration.

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