thread_safe< T > Class Template Reference

**Experimental** - A thread-safe object wrapper. More...

#include <thread_safe.hpp>

Inherits proton::internal::pn_ptr_base.

List of all members.

Public Member Functions

class event_loopevent_loop ()
 Get the event loop for this object.
unsafe ()
 Get the thread-unsafe proton object wrapped by this thread_safe<T>.

Detailed Description

template<class T>
class proton::thread_safe< T >

**Experimental** - A thread-safe object wrapper.

The proton::object subclasses (proton::connection, proton::sender etc.) are reference-counted wrappers for C structs. They are not safe for concurrent use, not even to copy or assign.

A pointer to thread_safe<> can be used from any thread to get the proton::event_loop for the object's connection. The object will not be destroyed until the thread_safe<> is deleted. You can use std::shared_ptr, std::unique_ptr or any other memory management technique to manage the thread_safe<>.

Use make_thread_safe(), make_shared_thread_safe(), make_unique_thread_safe() to create a thread_safe<>

See also:
mt_page

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

Generated on 27 Jan 2017 for Qpid Proton C++ by  doxygen 1.6.1