Re: [cx-oracle-users] Greenlet compatibility for cx_oracle?
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2010-09-27 18:01:10
|
Hi, 2010/9/27 Jerry Spicklemire <jsp...@gm...>: > Greetings, > > I've been scouring the web for information on how to use > cx-oracle in a compatible way with Greenlets. > > Well, specifically, with Eventlet, which uses greenlets as > the foundation of its async / concurrency features. > > Recently, when the PostgreSQL folks added async hooks, > and psycopg2 was updated to take advantage of them, > lots of things "just work", with Eventlet "monkeypatching". > > Any hope that cx_oracle will grow similar abilities, > any time soon? I'm afraid it will be difficult to do the same with Oracle. psycopg does have an asynchronous mode where all commands are nonblocking. Oracle has nothing like this. OCIStmtExecute() is a blocking call, and won't play nicely with Greenlets. Asynchronous framework like twisted execute Oracle queries in a dedicated thread. Maybe you could do the same. -- Amaury Forgeot d'Arc |