Skip to Content.
Sympa Menu

freetds - [freetds] Thread improvements on CVS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Thread improvements on CVS
  • Date: Sat, 03 Sep 2011 11:20:18 +0200

Hi,
for who is following CVS code you should have noted some changes
during last days. I finally manage to find some time to sort out and fix
my patches and work for thread and cancellation.

For libTDS there is now a TDSSOCKET->wire_mtx mutex which serialize
access to same connection (required). Currently this mutex is
automatically locked and unlocked on state changes. It does not
currently prevent memory races accessing TDSSOCKET outside
sending/receiving data.

For ODBC there are mutex for every structure (connection, statement,
environment and descriptors) locked and unlocked for every function.

Another change is cancellation. Currently a socketpair is used to advise
sending thread of a pending cancellation. This way you can safely cancel
from signal (as ctlib/dblib specification) and from another thread (as
ODBC specification) without memory races problems.

All these changes minimally affect token.c and query.c

Frediano





  • [freetds] Thread improvements on CVS, Frediano Ziglio, 09/03/2011

Archive powered by MHonArc 2.6.24.

Top of Page