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

Async input/output class which may be used to manage ASIO operations. More...

#include <Asio.hpp>

Inheritance diagram for rstudio::launcher_plugins::system::AsioService:
rstudio::launcher_plugins::Noncopyable

Static Public Member Functions

static void post (const AsioFunction &in_work)
 Posts a job to be completed by this ASIO Service. More...
 
static void setSignalHandler (const OnSignal &in_onSignal)
 Sets the signal handler on the ASIO service. More...
 
static void startThreads (size_t in_numThreads)
 Creates and adds the specified number of worker threads to the ASIO service. More...
 
static void stop ()
 Stops the ASIO Service. More...
 
static void waitForExit ()
 

Additional Inherited Members

- Public Member Functions inherited from rstudio::launcher_plugins::Noncopyable
 Noncopyable ()=default
 Default constructor.
 
 Noncopyable (const Noncopyable &)=delete
 Deleted copy constructor.
 
Noncopyableoperator= (const Noncopyable &)=delete
 Deleted assignment operator.
 

Detailed Description

Async input/output class which may be used to manage ASIO operations.

Member Function Documentation

◆ post()

static void rstudio::launcher_plugins::system::AsioService::post ( const AsioFunction &  in_work)
static

Posts a job to be completed by this ASIO Service.

Parameters
in_workThe job to be posted to the ASIO Service.

◆ setSignalHandler()

static void rstudio::launcher_plugins::system::AsioService::setSignalHandler ( const OnSignal &  in_onSignal)
static

Sets the signal handler on the ASIO service.

The ASIO service will manage signals sent to the process. The signal handler provided here will be invoked when a signal is received.

Parameters
in_onSignalThe function to invoke when a signal is received.

◆ startThreads()

static void rstudio::launcher_plugins::system::AsioService::startThreads ( size_t  in_numThreads)
static

Creates and adds the specified number of worker threads to the ASIO service.

Parameters
in_numThreadsThe number of worker threads to add to the ASIO service.

◆ stop()

static void rstudio::launcher_plugins::system::AsioService::stop ( )
static

Stops the ASIO Service.

Calling this function will stop all async IO operations for the whole Plugin. IMPORTANT: Only call this function from the main thread immediately prior to shutdown.


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