RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
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... | |
Class which performs an action asynchronously every specified number of seconds.
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.
in_error | The error which occurred. |
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.
in_timeDuration | The amount of time to wait between each event. |
in_event | The action to perform every in_timeDuration. |