Raised This Month: $ Target: $400
 0% 

multithread request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
p00r
Member
Join Date: Jul 2005
Old 07-16-2005 , 15:19   multithread request
Reply With Quote #1

Is really no need for a multithread module for amxmodx ??
p00r is offline
BAILOPAN
Join Date: Jan 2004
Old 07-16-2005 , 15:56  
Reply With Quote #2

The AMX/Small machine (which is the scripting backend to Admin-Mod, AMX Mod, and AMX Mod X), is not thread safe.

Simply put, if two threads are modifying the state of the Small machine at once, it can seriously corrupt the state of the plugin.

This is why the multithreading module by dJeyL back in the AMX Mod 0.9.3 days simply crashed or caused weird errors most of the time.

In order to make the machine thread safe, we'd need to put mutex locks on the amx_Exec routine - which basically defeats the point of making it safe anyway, since the execution of one callback would interrupt the main worker thread of the HLServer.

so, sorry, but I don't think we'll try this it wouldn't be a lot of work, but it would have no clear benefit or even a detrimental one.
__________________
egg
BAILOPAN is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-16-2005 , 17:33  
Reply With Quote #3

I can only see one need so far (there could be more) to have multithreaded possibilities: sql communication. SQL in realtime environments sucks to be honest.

I had an idea to "enhance" the DBI a little by giving the scripter and/or end user (server admin) the possibility of choosing what SQL module should take care of a certain plugin. This would assume that you could load several SQL modules at once, with one being the default one catching all "undirected" SQL calls.
That way for instance you could run DB intensive plugins (think WC3) using a faster SQL alternative like sqlite, and at the same time you could still run some other plugins with few unintensive SQL calling that could make use of distant *sql dbs just because they don't need to update so frequently (think stats plugins updating data at map changes).
Johnny got his gun is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode