On Fri, 2008-01-18 at 13:38 -0500, Matt Sergeant wrote: > On 18-Jan-08, at 12:52 PM, Guy Hulbert wrote: > > > On Fri, 2008-01-18 at 12:19 -0500, Matt Sergeant wrote: > >>> What kinds of things do plugins need to avoid in an asynchronous > >>> world? > >> > >> Blocking. :-) > > > > Could you elaborate a little on this or provide a reference (link not > > biblio). > > Sure. Basically I mean network access (file access too, but it has > MUCH less of an effect on things). So your typical examples in
Hmm... I keep forgetting how busy the disk can get with a lot of mail. I did look for a basic reference on google and this one is pretty good: http://twistedmatrix.com/projects/core/documentation/howto/async.html [python warning ;-)] The second hit was MSDN ... they use threads for async ... the reference above makes it pretty clear that this is probably not a good idea. > qpsmtpd would be DNS lookups (mostly already taken care of in core), > callouts to spamd, or SMTP calls to queue/smtp-forward. > > I *do* intend to write async versions of those plugins at some point, > it's just getting around to it. > > It's also worth noting that they work just fine already - it's just > that they will block and thus not give as good performance as they > possibly could, which will be relevant on high traffic sites. > > Matt. -- --gh