[Stackless] Connecting To A Database

Christopher Armstrong radix at twistedmatrix.com
Sat Jun 9 00:20:26 CEST 2007


On 6/8/07, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> Hello Cosmin:
>
> --- Cosmin Stejerean <cstejerean at gmail.com> wrote:
>
> > I think this has the saame drawbacks as doing this
> > by hand in Stackless by moving blocking calls to
> >separate threads. I think to exploit the full power
> > of Stackless there ought to be an asynchronous way
> > of doing this from pure Python without having to
> >fallback on threads.
>
> You should be able to use Twisted and Stackless in a
> single native thread. To the best of my knowledge,
> adbapi module does not use threads under the hood.
>
> Give me a few days to try it out....

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).

-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list