[Twisted-Python] module interface checking tool
glyph at divmod.com
Tue Aug 10 00:23:29 EDT 2004
On Mon, 2004-08-09 at 22:48, Dave Peticolas wrote:
> On the subject of adbapi using t.i.threads._putResultInDeferred,
> the latter function is useful for anyone managing their own threads.
> Anyone object if it is renamed to putResultInDeferred and made
Actually, yes, I would object.
It's a severe wart that adbapi uses t.p.threadpool directly; IIRC it's
one of the major issues with doing a proper reactor shut-down. It
should be doing reactor.callInThread, not its own thread management. I
will note that the API which uses it is simply a deferToThread clone.
All the thread-management logic in adbapi can easily be ported to use
t.i.threads.deferToThread and use logical task queue identifiers instead
of physical thread IDs. If you agree, please create an issue in the
tracker for this.
Chandler might have a legitimate use-case for putResultInDeferred, but
I'd still like to try to talk them out of doing their own thread
management first :).
More information about the Twisted-Python