mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
refactor: use C++11 default initializers
This commit is contained in:
parent
d5d40d59f8
commit
7aa40f5563
39 changed files with 57 additions and 88 deletions
|
|
@ -73,19 +73,16 @@ private:
|
|||
Mutex cs;
|
||||
std::condition_variable cond GUARDED_BY(cs);
|
||||
std::deque<std::unique_ptr<WorkItem>> queue GUARDED_BY(cs);
|
||||
bool running GUARDED_BY(cs);
|
||||
bool running GUARDED_BY(cs){true};
|
||||
const size_t maxDepth;
|
||||
|
||||
public:
|
||||
explicit WorkQueue(size_t _maxDepth) : running(true),
|
||||
maxDepth(_maxDepth)
|
||||
explicit WorkQueue(size_t _maxDepth) : maxDepth(_maxDepth)
|
||||
{
|
||||
}
|
||||
/** Precondition: worker threads have all stopped (they have been joined).
|
||||
*/
|
||||
~WorkQueue()
|
||||
{
|
||||
}
|
||||
~WorkQueue() = default;
|
||||
/** Enqueue a work item */
|
||||
bool Enqueue(WorkItem* item) EXCLUSIVE_LOCKS_REQUIRED(!cs)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue