mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-28 00:16:17 +02:00
delete inactive connections
git-svn-id: svn://elaine/murooma/trunk@184 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
d0352ce463
commit
2e4eb2f999
1 changed files with 7 additions and 1 deletions
|
@ -69,13 +69,19 @@ public:
|
|||
cond_.notify_one();
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
{
|
||||
std::unique_lock<std::mutex> mlock(mutex_);
|
||||
return queue_.size();
|
||||
}
|
||||
|
||||
Queue()=default;
|
||||
Queue(const Queue&) = delete; // disable copying
|
||||
Queue& operator=(const Queue&) = delete; // disable assignment
|
||||
|
||||
private:
|
||||
std::queue<T> queue_;
|
||||
std::mutex mutex_;
|
||||
mutable std::mutex mutex_;
|
||||
std::condition_variable cond_;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue