View Single Post
BAILOPAN
Join Date: Jan 2004
Old 10-13-2004 , 19:11  
Reply With Quote #2

No



I'll expand on this. The HLDS server never has, and probably never will, allow for nice threading like this. It's a huge amount of work to make something threading safe, especially for something complicated like a game engine - which requires precision and compensation. You don't know when the OS will process threads - so sensitive stuff can get very intricate.

For SourceMod, there's no reason to do this. Say the server is about to process a command - under your model, this should be threaded - but by the time metamod has finished the call, all of the things relevant could have been deallocated/destructed. Then when the thread finally executes, bad things happen.

Case in point, the reason mthread module never worked is because people didn't look into these inconsistencies.

Now, I haven't announced this publically yet, but one version of SourceMod will be bundled with an embedded web server. This will be threaded. SourceMod will also be making many database calls - these can't be threaded, but there aren't too many situations in which this is a problem.
BAILOPAN is offline