Mir
Public Member Functions | Protected Member Functions | List of all members
mir::Executor Class Referenceabstract

An executor abstraction mostly compatible with C++ proposal N4414. More...

#include <executor.h>

Inheritance diagram for mir::Executor:
[legend]

Public Member Functions

virtual void spawn (std::function< void()> &&work)=0
 Schedule some function to be called sometime in the future. More...
 

Protected Member Functions

virtual ~Executor ()=default
 

Detailed Description

An executor abstraction mostly compatible with C++ proposal N4414.

As specified in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0008r0.pdf

This should hopefully be compatible with whatever the C++ Executors and Schedulers group come up with as a final design, and will eventually be replaced by the standard version.

If not, this minimal interface should be easy to implement on top of whatever emerges from the standards body.

Constructor & Destructor Documentation

virtual mir::Executor::~Executor ( )
protectedvirtualdefault

Member Function Documentation

virtual void mir::Executor::spawn ( std::function< void()> &&  work)
pure virtual

Schedule some function to be called sometime in the future.

It is expected that this not eagerly execute, and will return before work() is executed.

Parameters
[in]workFunction to execute in Executor specified environment.

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

Copyright © 2012-2016 Canonical Ltd.
Generated on Wed May 10 10:41:27 UTC 2017