This is a long term research project that will probably take a month of concentrated effort.
We should investigate whether it is practical to have a thread safe timer/interrupt based transaction timeout implementation. A non-thread safe implementation was present prior to revision 128441.
Among the issues that need to be investigated are the extent to which IO is actually interruptable and what existing drivers do when they are interrupted. For this to work, managed connections that get interrupted during io must be reliably destroyed.
We should also investigate to what extent this provides a solution for deadlock resolution.
If we decide that this is impractical, we should change the internal time unit for timeouts from milliseconds to seconds as proposed in