un-threadsafe sqlite

Matthias Andree matthias.andree at gmx.de
Sun Apr 9 21:07:51 CEST 2006


Nathaniel Irons <ndi-l at bumppo.net> writes:

> I'd like to try bogofilter on a pair networks shared hosting account.
> They're using FreeBSD 4.8, and I'm having a hard time building sqlite with
> --enable-threadsafe -- make dies with a bunch of pthread errors.

Leaving aside that 4.8 support (including security support) has been
discontinued quite a while ago and thread support was rather
experimental in the midst of the 4.X series and improved a lot with
newer FreeBSD versions, bogofilter isn't multithreaded in the
POSIX/Linux sense of "thread".

I'd suggest though that you ask them to update to 4.11 soon (or better 6.1
after its release right away, which is FreeBSD 4 compatible).

> Is bogofilter perchance safe to use with a sqlite back-end that isn't
> itself threadsafe?

Yes, it is.  Bogofilter is single-threaded as far as -lthread, -lpthread
and the other FreeBSD threading implementations (whose names I forgot)
are concerned.

> Because if bogofilter doesn't care, then I don't care,

Bogofilter doesn't care. It will work with a single-threaded sqlite.

> though I assume I get enough mail that there will be near-simultaneous
> invocations made on a regular basis.

Nevermind. Bogofilter uses locking and transactions where necessary to
work properly even if you're running a dozen registration and a hundred
scoring processes at the same time.

-- 
Matthias Andree



More information about the Bogofilter mailing list