diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-26 12:30:23 -0700 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-25 21:37:58 -0700 |
commit | b385baadc8e73ff3c499a0111e2a553d35dd29b6 (patch) | |
tree | a4ee493d0b6f39d5fb8f11a2df88c20ae6f6e785 /events/roommessageevent.cpp | |
parent | 2aa9d96134567576d15e4807071990883f3ef6d3 (diff) | |
download | libquotient-b385baadc8e73ff3c499a0111e2a553d35dd29b6.tar.gz libquotient-b385baadc8e73ff3c499a0111e2a553d35dd29b6.zip |
Direct chat (un)marking: update internal structure synchronously
The asynchronous update first implemented was more verbose and caused
more problems than provided solutions. The idea was that the internal
directChats map would better reflect the server state if updated
asynchronously. However, it also causes a local race condition; e.g., to
quickly remove rooms from direct chats one after another becomes very
non-trivial (one has to wait until the previous operation succeeds). So
after some playing with the code, hitting pitfalls along the way, I
decided to align the logic with the one for room tags; synchronously
issued signals look uglyish but at least work predictably. And race
conditions between several clients generally cannot be cleanly resolved
anyway.
Diffstat (limited to 'events/roommessageevent.cpp')
0 files changed, 0 insertions, 0 deletions