[spambayes-dev] stopping pop3proxy
Meyer, Tony
T.A.Meyer at massey.ac.nz
Mon Aug 25 21:10:27 EDT 2003
[Tony]
> > Done. (There are now only three pop3proxy functions of
> > interest: prepare(), start() and stop(). They do what you
> > would expect, and all take a pop3proxy.State object (like
> > pop3proxy.state) as the only parameter).
[Mark]
> stop() appears dangerous - remember it is called
> asynchronously, so another thread could be doing almost
> anything. What we really need is a trigger to tell the main
> loop to stop, and the save should be done as that loop terminates.
I understand what you're saying, but I don't know how to do this -
hopefully Richie does. The closest I can think of is that stop() needs
to call stop_when_done() on each of the BayesProxy objects, and then
wait until they have all stopped (I don't know how to check this). Then
save then return.
Richie - any advice?
Also in terms of stopping pop3proxy, on my fiance's computer pop3proxy
is running all the time so that she doesn't have to know how to start &
stop it when checking for mail (it's too old for pop3proxy_service).
This works fine, except that when she shuts down Windows, it comes up
with a "can't shut this program down" message (it does terminate it
after a delay, but it's annoying). Is there some way that we can handle
this? I presume Windows sends a sigterm or something to the
application? Would other OSs do exactly the same thing?
=Tony Meyer
More information about the spambayes-dev
mailing list