Bitcoin Core 28.99.0
P2P Digital Currency
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
DynSock::Queue Class Reference

A basic thread-safe queue, used for queuing sockets to be returned by Accept(). More...

#include <net.h>

Collaboration diagram for DynSock::Queue:
[legend]

Public Types

using S = std::unique_ptr< DynSock >
 

Public Member Functions

void Push (S s) EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
 
std::optional< SPop () EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
 
bool Empty () const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
 

Private Member Functions

std::queue< S > m_queue GUARDED_BY (m_mutex)
 

Private Attributes

Mutex m_mutex
 

Detailed Description

A basic thread-safe queue, used for queuing sockets to be returned by Accept().

Definition at line 275 of file net.h.

Member Typedef Documentation

◆ S

using DynSock::Queue::S = std::unique_ptr<DynSock>

Definition at line 278 of file net.h.

Member Function Documentation

◆ Empty()

bool DynSock::Queue::Empty ( ) const
inline

Definition at line 297 of file net.h.

◆ GUARDED_BY()

std::queue< S > m_queue DynSock::Queue::GUARDED_BY ( m_mutex  )
private

◆ Pop()

std::optional< S > DynSock::Queue::Pop ( )
inline

Definition at line 286 of file net.h.

◆ Push()

void DynSock::Queue::Push ( S  s)
inline

Definition at line 280 of file net.h.

Member Data Documentation

◆ m_mutex

Mutex DynSock::Queue::m_mutex
mutableprivate

Definition at line 304 of file net.h.


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