[Stackless] Connecting To A Database
radix at twistedmatrix.com
Mon Jun 11 15:25:37 CEST 2007
On 6/8/07, Jeff Senn <senn at maya.com> wrote:
> On Jun 8, 2007, at 6:20 PM, Christopher Armstrong wrote:
> > No, adbapi does use threads. That's the only way to take advantage of
> > the existing blocking database client libraries.
> > It would be nice to do it without threads, but nobody's written decent
> > asynchronous implementations of the database protocols. (There's one
> > in the postgres client library, but I haven't seen anything good come
> > of it).
> So... generally you are not going to get this "pure performance"
> benefit unless you use another thread (than the one that is running
> Python) or your OS supports
> some kind of asynch I/O directly and you have Python support for it
Hold on, what? I must be misunderstanding you. As far as I can tell,
it's extremely likely that your OS supports asynchronous I/O and that
your Python does support it. It's called select() (or poll(), or
epoll, or kqueue, or WaitForMultipleEvents, or Windows' IOCP API).
Python supports many of these, and Twisted adds support for more. This
covers most platforms. Is this not the kind of thing you were talking
International Man of Twistery
Stackless mailing list
Stackless at stackless.com
More information about the Stackless