ccs-twistedextensions icon indicating copy to clipboard operation
ccs-twistedextensions copied to clipboard

add an explicit threadpool argument to ConnectionPool initializer

Open macosforgebot opened this issue 11 years ago • 1 comments

exarkun@… originally submitted this as ticket:835


ConnectionPool has a reactor (class) attribute that initializes to the global reactor. It uses this for IReactorThreads (to thread the actual SQL execution) and IReactorTime (to schedule reconnection attempts).

This makes it possible to fake things out for unit testing purposes, but not super convenient. Twisted itself doesn't include a good fake of IReactorThreads.

It seems ConnectionPool.__init__ could accept an (optional) ThreadPool instance to use instead of the IReactorThreads implementation of ConnectionPool.reactor.

macosforgebot avatar Jan 29 '14 18:01 macosforgebot

@wsanchez originally submitted this as comment:1:⁠ticket:835

  • Milestone set to Later

macosforgebot avatar Jan 30 '14 00:01 macosforgebot