block refresh until the last context has finished execution
This commit is contained in:
parent
e4732994b7
commit
85286b8807
|
@ -287,8 +287,6 @@ void Realm::cancel_transaction()
|
||||||
void Realm::invalidate()
|
void Realm::invalidate()
|
||||||
{
|
{
|
||||||
verify_thread();
|
verify_thread();
|
||||||
check_read_write(this);
|
|
||||||
|
|
||||||
if (m_in_transaction) {
|
if (m_in_transaction) {
|
||||||
cancel_transaction();
|
cancel_transaction();
|
||||||
}
|
}
|
||||||
|
@ -384,6 +382,10 @@ void Realm::close()
|
||||||
m_notifier->remove_realm(this);
|
m_notifier->remove_realm(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_group) {
|
||||||
|
m_shared_group->end_read();
|
||||||
|
}
|
||||||
|
|
||||||
m_group = nullptr;
|
m_group = nullptr;
|
||||||
m_shared_group = nullptr;
|
m_shared_group = nullptr;
|
||||||
m_history = nullptr;
|
m_history = nullptr;
|
||||||
|
|
|
@ -197,6 +197,12 @@ namespace realm {
|
||||||
public:
|
public:
|
||||||
UnitializedRealmException(std::string message) : std::runtime_error(message) {}
|
UnitializedRealmException(std::string message) : std::runtime_error(message) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ClosedRealmException : public std::runtime_error
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ClosedRealmException(std::string message) : std::runtime_error(message) {}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(REALM_REALM_HPP) */
|
#endif /* defined(REALM_REALM_HPP) */
|
||||||
|
|
Loading…
Reference in New Issue