[Twisted-Python] mutexes in twisted.enterprise?

Itamar Shtull-Trauring twisted at itamarst.org
Fri Apr 19 05:20:03 MDT 2002


Bob Ippolito wrote:

> It's not the order of the rows, it's the order in which the database 
> *processes* those rows.  I'm not doing inserts, I'm calling user defined 
> functions that do a pretty complex set of updates and inserts on 
> multiple tables depending on the new data and existing data.  It really 
> needs to process them in the order that they are received.

Basically, you should do what Sean suggested - setup a ConnectionPool or
whatever it's called, that only uses one thread. That way only one command
will run at once, and it'll run in order.

Check how enterprise.adbapi interacts with the threadtask module - a 
patch may be necessary in order to be able to use custom thread pools,
in which case you should patch your local install. Meanwhile I'll see if 
I can add this feature so it's in 0.17.3 or whatever the next release is.





More information about the Twisted-Python mailing list