Name: Anonymous 2007-12-15 17:53
OK so i have this program that dyanamically loads shared objects, it's modules that contain most of the programs functionality.
Now most of the modules i've written so far are very simple, 50 lines or less, just do something simple and return.
Only one module so far absolutely requires a seperate process or thread.
Since anonymous users will be interacting with this program i'm contemplating if i should make it create a new thread for every module it executes or make each module handle that if required.
Basically the main question here is, how safe it is to let any random loser execute commands that has my program create a new thread each time for very simple tasks? Weighed against having all future modules threaded by default.
I'm leaning towards letting each module handle that as it feels fit, because people might have to start writing their own modules for this program in the future and perhaps it's best to let them decide if they want the module to run in a thread or not.
Actually, writing this post has helped me decide on what to do but i'll post it anyways. The program is an irc bot in ansi c, i should have mentioned that.
Now most of the modules i've written so far are very simple, 50 lines or less, just do something simple and return.
Only one module so far absolutely requires a seperate process or thread.
Since anonymous users will be interacting with this program i'm contemplating if i should make it create a new thread for every module it executes or make each module handle that if required.
Basically the main question here is, how safe it is to let any random loser execute commands that has my program create a new thread each time for very simple tasks? Weighed against having all future modules threaded by default.
I'm leaning towards letting each module handle that as it feels fit, because people might have to start writing their own modules for this program in the future and perhaps it's best to let them decide if they want the module to run in a thread or not.
Actually, writing this post has helped me decide on what to do but i'll post it anyways. The program is an irc bot in ansi c, i should have mentioned that.