Jump to content

Best way to implement Multi Threaded Support


Guest Jordz

Recommended Posts

there is not any other word,

Multi threaded pools = Multi threaded core.

That's not quite true...

Multithreaded is anything that has more than one thread. Mangos already has multiple threads, but the "heavy" workload is not distributed among several threads.

Thread pool is a more specific concept. If you have 4 hyperthreaded cores, so you can handle 8 threads concurrently, you can create a pool of 8 threads and try to distribute the workload among these threads.

Link to comment
Share on other sites

Thread pool is a more specific concept. If you have 4 hyperthreaded cores, so you can handle 8 threads concurrently, you can create a pool of 8 threads and try to distribute the workload among these threads.

You can also have a thread pool of 20 threads, or 10 or 50. Even with only 1 core.

Imho if you have one thread per map, that is not a threadpool because a request for a specific map will always be handled by the same thread. And the threads will live for the whole duration of server runtime.

from top of my head there are multiple ways to implement more "multithreadedness" into mangos:

1) Global Threadpool that handles everything: Packets, AI, Timers

2) Threads for specific tasks for example run chat on own thread or things like that

3) Threads per specific area (map, zone, grid)

4) mix of above

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use