Skip to Content.
Sympa Menu

freetds - [freetds] dbdataready?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Marc Abramowitz <msabramo AT gmail.com>
  • To: FreeTDS mailing list <freetds AT lists.ibiblio.org>
  • Cc: John Anderson <sontek AT gmail.com>
  • Subject: [freetds] dbdataready?
  • Date: Thu, 26 Sep 2013 17:52:02 -0700

Today, a colleague and I got excited about making pymssql "green" by
supporting "green" thread implementations like gevent by adding a callback
to pymssql that it would call after the query has been sent and before the
results are received. One could have this callback call something like
gevent.sleep() to yield control to another greenlet.

I implemented a very basic version of this that calls the callback after
calling dbsqlsend and before calling dbsqlok (which blocks) [1]. This very
basic implementation kind of helps in some cases because yielding after the
dbsqlsend gives other coroutines a chance to run but it's not fully green
because the dbsqlok is a blocking operation so when it gets hit it will
block all coroutines.

What I'd really like to get do is use the dbdataready [1] function of
DB-API so that I can avoid blocking on dbsqlok. Unfortunately, it seems
that it was never implemented in FreeTDS

Are there any plans to implement dbdataready or the dbpoll, the Sybase
flavor of async?

Marc

[1] https://github.com/pymssql/pymssql/pull/133/files
[2] http://technet.microsoft.com/en-us/library/aa937037.aspx




Archive powered by MHonArc 2.6.24.

Top of Page