#include <exception>
#include <functional>
#include <memory>
#include "debug.h"
#include "threading/thread.h"
Go to the source code of this file.
Classes | |
class | LambdaThread |
Class returned by runInThread . More... | |
Functions | |
std::unique_ptr< LambdaThread > | runInThread (const std::function< void()> &fn, const std::string &thread_name="") |
Run a lambda in a separate thread. | |
std::unique_ptr< LambdaThread > runInThread | ( | const std::function< void()> & | fn, |
const std::string & | thread_name = "" ) |
Run a lambda in a separate thread.
Exceptions will be caught.
fn | function to run |
thread_name | name for thread |
LambdaThread
Referenced by Game::createSingleplayerServer(), and Game::shutdown().