Horizon Official Technical Documentation
|
|
#include <ThreadSafeQueue.hpp>
Classes | |
struct | node |
Public Member Functions | |
ThreadSafeQueue () | |
~ThreadSafeQueue () | |
ThreadSafeQueue (const ThreadSafeQueue &other)=delete | |
ThreadSafeQueue & | operator= (const ThreadSafeQueue &other)=delete |
std::shared_ptr< T > | try_pop () |
void | push (T &&new_value) |
std::size_t | size () |
bool | empty () |
std::shared_ptr< T > | front () |
Private Member Functions | |
node * | get_tail () |
std::unique_ptr< node > | pop_head () |
Private Attributes | |
std::mutex | head_mutex |
std::unique_ptr< node > | head |
std::mutex | tail_mutex |
node * | tail |
|
inline |
|
inline |
References ThreadSafeQueue< T >::size(), and ThreadSafeQueue< T >::try_pop().
|
delete |
|
inline |
References ThreadSafeQueue< T >::get_tail(), ThreadSafeQueue< T >::head, and ThreadSafeQueue< T >::head_mutex.
Referenced by Horizon::Networking::Socket< SocketType >::handle_queue(), and Horizon::Networking::Socket< SocketType >::update().
|
inline |
References ThreadSafeQueue< T >::front(), ThreadSafeQueue< T >::head, and ThreadSafeQueue< T >::head_mutex.
Referenced by ThreadSafeQueue< T >::front(), and Horizon::Networking::Socket< SocketType >::handle_queue().
|
inlineprivate |
References ThreadSafeQueue< T >::tail, and ThreadSafeQueue< T >::tail_mutex.
Referenced by ThreadSafeQueue< T >::empty(), and ThreadSafeQueue< T >::pop_head().
|
delete |
|
inlineprivate |
References ThreadSafeQueue< T >::get_tail(), ThreadSafeQueue< T >::head, and ThreadSafeQueue< T >::head_mutex.
Referenced by ThreadSafeQueue< T >::try_pop().
|
inline |
References ThreadSafeQueue< T >::node::data, ThreadSafeQueue< T >::node::next, ThreadSafeQueue< T >::tail, and ThreadSafeQueue< T >::tail_mutex.
Referenced by BOOST_AUTO_TEST_CASE(), Horizon::Networking::Socket< SocketType >::queue_buffer(), Horizon::Networking::AcceptSocketMgr< SocketType, NetworkThreadType >::set_socket_for_management(), Horizon::Networking::AcceptSocketMgr< SocketType, NetworkThreadType >::set_socket_for_removal(), and WorkerThreadPool::submit().
|
inline |
References GridTypeListIterator::count(), ThreadSafeQueue< T >::head, ThreadSafeQueue< T >::head_mutex, ThreadSafeQueue< T >::node::next, and ThreadSafeQueue< T >::tail_mutex.
Referenced by BOOST_AUTO_TEST_CASE(), and ThreadSafeQueue< T >::~ThreadSafeQueue().
|
inline |
References ThreadSafeQueue< T >::pop_head().
Referenced by BOOST_AUTO_TEST_CASE(), Horizon::Networking::Socket< SocketType >::handle_queue(), Horizon::Networking::AcceptSocketMgr< SocketType, NetworkThreadType >::manage_sockets(), WorkerThreadPool::worker_thread(), and ThreadSafeQueue< T >::~ThreadSafeQueue().
|
private |
|
private |
|
private |
Referenced by ThreadSafeQueue< T >::get_tail(), and ThreadSafeQueue< T >::push().
|
private |
Referenced by ThreadSafeQueue< T >::get_tail(), ThreadSafeQueue< T >::push(), and ThreadSafeQueue< T >::size().