I want to use multithreading in my mmorpg in C ++, at the moment I have 5 threads and I want to split the other into two, but my mmorpg server combines a lot of vectors and because arn't threadsafe vectors write, I can’t do it right.
Is there an alternative to using streaming vectors, or is there a way to do multithreaded read / write writes.
Here is an example of what I don't want, try finding an alternative to something like this: Obviously this is not actual code, I'm just doing an example.
globals::monstername[myid];
senddata(globals::monstername[myid]);
globals::monstername.push_back("FatBlobMonster");
source
share