Libosmium  2.1.0
Fast and flexible C++ library for working with OpenStreetMap data
Classes | Functions | Variables
osmium::thread Namespace Reference

Threading-related low-level code. More...

Classes

class  function_wrapper
 
class  Pool
 
class  Queue
 
class  SortedQueue
 

Functions

template<class T >
void check_for_exception (std::future< T > &future)
 
template<class T >
void wait_until_done (std::future< T > &future)
 
void set_thread_name (const char *name)
 

Variables

OSMIUM_CONSTEXPR std::chrono::milliseconds full_queue_sleep_duration { 10 }
 

Detailed Description

Threading-related low-level code.

Function Documentation

template<class T >
void osmium::thread::check_for_exception ( std::future< T > &  future)
inline

Check if the future resulted in an exception. This will re-throw the exception stored in the future if there was one. Otherwise it will just return.

void osmium::thread::set_thread_name ( const char *  name)
inline

Set name of current thread for debugging. This only works on Linux.

template<class T >
void osmium::thread::wait_until_done ( std::future< T > &  future)
inline

Wait until the given future becomes ready. Will block if the future is not ready. Can be called more than once unless future.get().

Variable Documentation

OSMIUM_CONSTEXPR std::chrono::milliseconds osmium::thread::full_queue_sleep_duration { 10 }