0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/client/sync/rooms/state: Query for event_idx outside of lock; hint pool.

This commit is contained in:
Jason Volk 2019-07-14 15:13:49 -07:00
parent 6a2c5f2047
commit 198d3ff884

View file

@ -277,11 +277,13 @@ ircd::m::sync::room_state_phased_events(data &data)
[&data, &array, &ret, &mutex](const m::event &event)
{
ret |= true;
const auto event_idx(m::index(event));
const std::lock_guard lock{mutex};
room_state_append(data, array, event, index(event));
room_state_append(data, array, event, event_idx);
}
};
sync::pool.min(6);
ctx::concurrent_for_each<const std::pair<string_view, string_view>>
{
sync::pool, keys, [&data, &append](const auto &key)