[Pymilter] really long processing
Eric S. Johansson
esj at harvee.org
Tue May 11 14:51:03 EDT 2004
Stuart D. Gathman wrote:
> pymilter is multi-threaded. There can be thousands of mail connections
> in progress - depending on memory and sendmail configuration. I
> routinely see hundreds. By using the "stackless" python VM (which
> uses linked lists for stack frames instead of allocating a fixed stack
> area per thread), you can support hundreds of thousands of simultaneous
> connections.
interesting. Which version of Python is stackless? I'm using 2.3 now
on one machine and 2.2.1 on another. I've been heavily encouraged by
some of pythonista to just stick with 2.3.
> If all access to a resource is from threads within the Python VM, then
> it is much more efficient to use a semaphore:
if it is multithreaded then yes, that would make more sense. Which says
I should probably made by locking code pay attention to multithreaded
this or not and do the appropriate type
which raises the question of how do you detect if multithreaded is active?
also, if I am calling an external program, which I do in both filter and
Stamper, will that kill threading (using popen and family)?
another question is if I am busy processing something externally, can
milter throw up a "stop" flag and ask the mail server to queue the
message and try again later (i.e. in 60 seconds) rather than doing the
queuing in threads?
---eric
<!DSPAM:FC75687B46274242419957580>
More information about the Pymilter
mailing list