Because Multithreadsystem is hard to understand I (and maybe some other) need some Informations
Basic informations are:
How many Thread and what Threads we have?
What is handle in each Thread?
- important method int Master::Run()
- this thread starts a lot of other thread
- in this the hole world are loaded in void World::SetInitialWorldSettings() (Startup) - also MapThreads are started here with
///- Initialize MapManager
sLog.outString( "Starting Map System" );
- starts a listener socket
How I unterstand Player actions?
Player loggin and lands on WorldSocket, now we create a new WorldSession
// NOTE ATM the socket is single-threaded, have this in mind ...
ACE_NEW_RETURN(m_Session, WorldSession(id, this, AccountTypes(security), expansion, mutetime, locale), -1);
/// Add an incoming packet to the queue
void WorldSession::QueuePacket(WorldPacket* new_packet)
ACE_Based::LockedQueue<WorldPacket*, ACE_Thread_Mutex> _recvQueue;
that function is called in void Map::Update(const uint32 &t_diff). Every Player has one WorldSession and the Map-Updater gets Session over the player.
In my eyes this looks good. Problems can accure with global stuff and dirty transports
Where we have Thread crossovers? Where we handle global collections like Guilds, BG-joinLists?
I know we have database Thread. How are handle database threads? Why we need more then one?
I think the locking of the last objects like PetList, AggroList is totally wrong. This List should use by one thread (the specific map-thread)
I hope that someone can help. Please write only english, better long simply sentences as to short and hard to unterstand.
Last edited by Reamer on Tue Jul 10 2012, 14:29; edited 3 times in total