#24: Make PyGreSQL thread-safe on the connection level
--------------------------+---------------------------
  Reporter:  cito         |      Owner:  darcy
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:  Someday/Maybe
 Component:  C Module     |    Version:  4.0
Resolution:               |   Keywords:
--------------------------+---------------------------
Changes (by cito):

 * milestone:  5.1 => Someday/Maybe


Comment:

 If we want to go from module level to connection level thread-safety, we
 need to introduce a connection lock or mutex and wrap all the critical
 parts in the pgdb connection methods ''and'' the underlying C code source
 object methods.

 We will need much better tests, including stress tests of the various
 connection methods with many threads that fail without the locks, before
 we could confidently claim to have threadsafety=2.

 It's certainly doable, but a hard nut to crack that requires much effort.

 Before deciding to tackle this, we should also collect some usage examples
 where threadsafety=2 would be important. When used with a web framework
 for instance, you usually have a thread-safe connection pool (e.g.
 provided by SQLAlchemy or DBUtils) and normally use a connection only
 within a single thread anyway.

--
Ticket URL: <http://trac.pygresql.org:8000/pgtracker/ticket/24#comment:2>
PyGreSQL <http://www.pygresql.org/>
PyGreSQL Tracker
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to