agathoandClaude Opus 4.5 323ff2021f perf(quest): Fix mutex contention in QuestCompletion with shared_mutex
PROBLEM: QuestCompletion used std::mutex for read-heavy data structures
which blocked ALL readers when ANY read was happening. With 100+ bots
calling quest-related functions from ThreadPool workers, this caused
severe lock contention and task delays.

AFFECTED MUTEXES (all read-heavy patterns):
- _pausedBotsMutex: Checked on EVERY quest event (HandleQuestEvent)
- _questOrderMutex: Read frequently during quest prioritization
- _objectiveOrderMutex: Read during objective sequencing

SOLUTION:
1. Changed _pausedBotsMutex from std::mutex to std::shared_mutex
   - Read operations (find) use std::shared_lock (concurrent readers OK)
   - Write operations (insert/erase) use std::unique_lock (exclusive)

2. Changed _questOrderMutex from std::mutex to std::shared_mutex
   - All operations use std::unique_lock (mostly writes in current code)
   - Future optimization: use shared_lock for read-only accesses

3. Changed _objectiveOrderMutex from std::mutex to std::shared_mutex
   - All operations use std::unique_lock (writes only currently)

This eliminates a major ThreadPool bottleneck where every bot's
quest event processing was blocking on mutex acquisition.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-02 13:26:00 -03:00
2026-01-20 21:24:33 -03:00
2026-01-28 18:45:01 -03:00
2026-01-28 18:45:01 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:33:16 -03:00
2026-02-02 00:47:02 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:14:35 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-30 20:37:05 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00

WowCommunityProject

Blizzlike WowCommunity project

S
Description
No description provided
Readme
308 MiB
Languages
C++ 89.3%
C 10.1%
CMake 0.4%