Quote:
Originally Posted by Hepatitis X
If you know how to multi thread, you won't make it unstable. :facepalm:
Besides, as Korvacs clearly explained, it will make your server more stable.
|
not necessarily, it all depends on your thread model. Theres pros and cons. Having something like a thread per player threadmodel is great for when 1 thread dies, it will only kill that player, however that would be a bad design overall though.
Quote:
|
Originally Posted by Korvacs
if one thread fails you can always start it again from anouther thread
|
not every thread model will be able to use another thread to restore the previous state and fix everything up.
You could have a single thread design, with a backup thread doing nothing and waiting around for that thread to die, to continue it's work (similar to what you mentioned) however it's hardly classed as a multi-threaded server.
overall threads should not be failing and if they did, you learn from it and fix it, i personally would not waste my time letting other threads try and take over, fix and restore it all back to normal when a thread fails (as this sort of thing is not supposed to happen anyway), unless the thread model was specifically designed for a threadpool to manage tasks (then if a thread fails for whatever reason, simply dispatch a new one and report the error)
without the errors, multithreading is for performance (taking better advantage of todays hardware to increase the load your server can take without a bottleneck), barely for stability.
whilst we are on the subject of parallelism, how does thread model to your server Korvacs work? out of curiosity.