James,

I have a lot of experience of both thread and fork based network services applications, and it is my opinion that for a solid stable robust service it is not possible to use threads. The shared leaking issue in particular makes it too problematic.

This is disputable. Regarding threads you have to understand the topic. There are fine books available on threading.


I have written an alternative "clamd", "clamdscan" and "clam-milter" that use the most excellent ClamAV scanning engine (libclamd), but uses a process based model instead of a threads based model for "clamd".

It's an easy work around but performance is bad if you are spawning processes. Threads are faster, but you have to be careful in your programming.


Yes, and no. This is obviously NOT the way to do it (and *not* the way that "nclamd" does it) , but (on Linux anyway) forking a process is pretty much the same cost as forking a thread, both of which are pretty cheap. It is because fork() is often followed by exec() that it has got a bad reputation - exec() is pretty expensive.

And then there are BSD systems. Make solution that performs well on all environments. That would be fine.


- Marc



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Clamav-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-devel

Reply via email to