Skip to content

Thread safety#37

Merged
zhangbo8418 merged 9 commits intozhangbo8418:Testfrom
blinkysc:threadSafety
Nov 18, 2025
Merged

Thread safety#37
zhangbo8418 merged 9 commits intozhangbo8418:Testfrom
blinkysc:threadSafety

Conversation

@zhangbo8418
Copy link
Copy Markdown
Owner

No description provided.

blinkysc and others added 9 commits November 6, 2025 11:37
Implemented operation queue system to handle group, guild, arena,
and battleground operations in the world thread instead of map threads.

This fixes race conditions and crashes when multiple bots interact
with groups simultaneously.

Changes:
- Added PlayerbotOperation base class and world thread processor
- Group operations: invite, remove, convert to raid, set leader
- Arena formation: complex multi-step workflow in single operation
- Guild operations: changed to use packet queueing
- Bot logout: queue group cleanup to avoid races

All thread-unsafe operations now execute safely in the world thread
via the operation queue processed in WorldScript::OnUpdate.
- Add missing #include <memory> to PlayerbotOperation.h for std::unique_ptr
- Fix buffer overflow warning in PlayerbotAIConfig.cpp GetTimestampStr()
This reverts commit 64da37dd3775385c38c884b7850a5d8af4ab8137.
@zhangbo8418 zhangbo8418 merged commit e284a63 into zhangbo8418:Test Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants