A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCSyncQueue__DefaultTraits.html below:

NCBI C++ ToolKit: CSyncQueue_DefaultTraits Class Reference

Search Toolkit Book for CSyncQueue_DefaultTraits

Default traits for the CSyncQueue class. More...

#include <util/sync_queue.hpp>

Default traits for the CSyncQueue class.

It also serves as a base class for user defined CSyncQueue traits.

Definition at line 556 of file sync_queue.hpp.

◆ CSyncQueue_Traits_Must_Be_Inherited_From_CSyncQueue_DefaultTraits() static void CSyncQueue_DefaultTraits::CSyncQueue_Traits_Must_Be_Inherited_From_CSyncQueue_DefaultTraits ( void  ) inlinestatic

At the moment the only requirement to the traits is to provide a static function which tells f the queue can be used from many threads (IsUsedConcurrently()).

Later on the traits could be extended while the CSyncQueue template arguments will not be changed. To make sure that future extensions of the traits won't break the existing user code the alternative implementations of the CSyncQueue traits must derive from CSyncQueue_DefaultTraits.

Definition at line 588 of file sync_queue.hpp.

◆ IsUsedConcurrently() static bool CSyncQueue_DefaultTraits::IsUsedConcurrently ( void  ) inlinestatic

Tells if the queue can be used from many threads.

Derived classes can re-implement this method. If this method provides incorrect information then the following two cases lead to specific problems: 1. The application is in a single thread mode or does not use the queue from many threads concurrently but the method tells the queue can be used concurrently: the methods with timeouts will wait for the specified timeout even if it is an infinite one. 2. The application is multithreaded and the queue is used from many threads but the method tells the queue cannot be used concurrently: the methods with timeouts will return right away without waiting during the specified timeout.

Definition at line 574 of file sync_queue.hpp.

References CThread::GetThreadsCount().

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4