summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2015-04-10 20:52:49 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2015-04-10 20:52:49 +0200
commitc03a0668977fd86d34d76bbac11027bec07c119e (patch)
treedf0a9418078e39b7f093d5cfc683514b99eff12c
parenta567c1e293909d15d6ad76c4e4af0fc1b0978ad3 (diff)
Posting semaphore on eventpush.
-rw-r--r--src/cachemanager.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cachemanager.cc b/src/cachemanager.cc
index 81d809a..366cd49 100644
--- a/src/cachemanager.cc
+++ b/src/cachemanager.cc
@@ -177,8 +177,11 @@ void CacheManager::thread_main()
void CacheManager::pushEvent(event_t e)
{
// Check that if event should be merged (Maybe by event queue (ie. push in front).
+ {
MutexAutolock l(m_events);
eventqueue.push_back(e);
+ }
+ sem.post();
}
CacheManager::event_t CacheManager::createEvent(cacheid_t id, cmd_t cmd)