>-----Original Message----- >From: [email protected] [mailto:twisted-python- >[email protected]] On Behalf Of [email protected] >Sent: Thursday, August 06, 2009 3:25 PM >To: Twisted general discussion >Subject: Re: [Twisted-Python] Adbapi issues > >On 06:57 pm, [email protected] wrote: >>[snip] >>> >>>Supporting arraysize in some form is probably a good idea. Another >>>ticket is in order. >> >>Ok, I filed ticket #3956 >>...along with a patch for adbapi.py, and test_adbapi.py. > >Great. Thanks a lot! :) >>My apologies in advance for the test patch :o) >>I haven't written many tests, so I'm not exactly sure the best >>(or perhaps even a good way) of testing some things. > >No worries. I've given you some feedback on the ticket (I did that >before I noticed this email). Please feel free to ask if anything >I wrote is unclear. >>[snip]
Wow, the feedback on the patch (attempt) had a much gentler tone than I expected ;o) Thanks. I'll see what I can improve. >>...my understanding is that it's relatively easy to kill a thread on a >>Unix platform, but not as easy with Windows (which, unfortunately I >>use almost exclusively). > >It's about equally easy on either platform. However, it's also >basically unreliable on both platforms. What happens if the killed >thread held a mutex, for example? >>...maybe once *most* users are up to at least python version 2.6 (I'm >>not), >>I wonder if the threadpool in adbapi could be replaced with >>functionality >>> From the multiprocessing package. I would think it would be easier >to >>just kill and restart dead connections then. > >Twisted actually has good support for running child processes already, >so we don't have to wait for Python 2.6, if this is a direction that's >interesting. > >Perhaps something based on Ampoule would make sense? It could be an API >compatible replacement for twisted.enterprise.adbapi, but use child >processes >instead of threads, and add one new method for interrupting outstanding >work. > >Jean-Paul I've never looked at Ampoule, but I like the idea and wouldn't mind investigating the API compatible replacement idea (...not promising anything...). Gerrat _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
