Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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 301 of file net.h.

Member Typedef Documentation

◆ S

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

Definition at line 304 of file net.h.

Member Function Documentation

◆ Empty()

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

Definition at line 323 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 312 of file net.h.

◆ Push()

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

Definition at line 306 of file net.h.

Member Data Documentation

◆ m_mutex

Mutex DynSock::Queue::m_mutex
mutableprivate

Definition at line 330 of file net.h.


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