refs #601 Simplify syncLoad and rename to synchronize.

Now it doesn't return anything, it just causes the next async get() to be synchronized with the latest loaded value.
It does this by hooking into the queue introduced in the previous commit.
This commit is contained in:
Mathew Sutcliffe
2016-03-10 00:09:14 +00:00
parent 06ad77ee9d
commit c6a038aaa8
4 changed files with 64 additions and 38 deletions

View File

@@ -74,6 +74,14 @@ namespace BlackMisc
return result;
}
CValueCachePacket CValueCachePacket::takeByKey(const QString &key)
{
auto copy = *this;
remove(key);
copy.removeByKeyIf([ = ](const QString &key2) { return key2 != key; });
return copy;
}
void CValueCachePacket::registerMetadata()
{
MetaType::registerMetadata();