Raised This Month: $51 Target: $400
 12% 

Multi-threading


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Li0n
New Member
Join Date: Mar 2004
Old 05-04-2004 , 18:02   Multi-threading
Reply With Quote #1

and what about a real bug-free multi-threading module ? (unlike the amxmod module)
__________________
Li0n is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 05-04-2004 , 19:52  
Reply With Quote #2

Id like a module that lowers CPU load & makes me food to!!!!
EKS is offline
BAILOPAN
Join Date: Jan 2004
Old 05-04-2004 , 20:02  
Reply With Quote #3

while instaneous food distribution (IFD) is being worked on, sadly AMXx is not threading safe.

I will not make a threading module for one reason: programmers don't know how to use it properly. When I first tried it, I did not know AMX was not threading safe and my apps crashed.

I will try to make multithreading callback based modules that are isolated - for specific purposes. Multithreading mysql, sockets, etc... but not a module for "do anything in a thread".
__________________
egg
BAILOPAN is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 05-04-2004 , 20:32  
Reply With Quote #4

well, When i was playing with my HLRally stats plugin. I got the idea that you could make some functions multithreaded. ( Not realy mulittread, but have this spesfic function run in another thread then the rest is.) I do assume that if a plugin is triggered everything it does when triggered will be done in 1 server frame. ( Ie if i do "amx_ban IDIOT" everything the plugin that handels this command has do to to finnish bannig will be done in 1 server frame. )

That way plugins that do "heavy" calulations can do this in a seperate thread(Sort of a low pri thread, that all plugins can send tasks to). When its not importent that the calculation is done "exacly" at a spesfic time.

If i continue with my HLR stats plugin example. The plugin depends heavly on catching events, and collects info. But when a player finnishes a lap, his time is compared up against a TopX list. This calculation does not realy need to be finnished in the same server frame that he crossed the Goal line, but it is somewhat CPU heave ( At least the most CPU heavy thing i never made ).

This is just a idea i got when playing around with it, dunno how easly it would be to impliment.
EKS is offline
BAILOPAN
Join Date: Jan 2004
Old 05-04-2004 , 20:55  
Reply With Quote #5

it doesn't matter, the point is executing threaded functions is not safe in the amxx core with any native that uses strings.
__________________
egg
BAILOPAN is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 05-04-2004 , 21:16  
Reply With Quote #6

ok, to bad. Is it planned for any upcomming release ? Or to much rewrite required to make it work?
EKS is offline
BAILOPAN
Join Date: Jan 2004
Old 05-04-2004 , 21:28  
Reply With Quote #7

making amxx threading safe would be a very very difficult task. It's not feasible right now. the best idea is to make modules which are isolated in their own threading mechanisms
__________________
egg
BAILOPAN 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 04:51.


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