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:
parent
6a2c5f2047
commit
198d3ff884
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue