Can bogofilter run by multiprocess at the same time

Pavel Kankovsky peak at argo.troja.mff.cuni.cz
Mon Oct 25 12:01:35 CEST 2004


On Thu, 14 Oct 2004, David Relson wrote:

> One option is to create a struct that holds all the parameters and allow
> it to passed in.  I'm not sure that I truly like that,

Non-opaque structures are somewhat difficult to extend (e.g. when you want
to add a new parameter). Esp. when binary compatibility is required (e.g.
in a shared library).

> though I suspect the struct will be needed for multiple users of a
> shared library (if/when we support that.

It does not matter whether the library is static or shared.
It matters whether those multiple users live within a single address
space (ie. multiple threads of a single process) or not.

Multiple users in different addresses spaces do not need any special
handling (not even on MS Windows...unless you want to make your code
compatible with 3.1 <g>). Multiple users within a single address space can
be quite tricky, and the avoidance of static global data (including 
internal data) is often the most efficient solution.

--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"Resistance is futile. Open your source code and prepare for assimilation."




More information about the bogofilter-dev mailing list