From: Dave C. <dj...@ob...> - 2002-04-17 06:35:51
|
>>>>> "Dave" == Dave Cole <dj...@ob...> writes: Dave> The only way I can see to do this is to only allow a single Dave> thread to operate on a connection at a time. Before calling the Dave> Sybase API I would store the PyThreadState with my connection Dave> structure. When a callback is performed by the Sybase API I Dave> locate my connection structure and restore the associated Dave> PyThreadState before bouncing the callback up into the Python Dave> code registered for that callback. Just a heads-up. I have made the GIL modifications to the sybasect extension module and things seem to work OK. With the module compiled with threading enabled I successfully ran the examples/timeout.py program triggering a timeout callback. Now all I have to do is implement cs_config() in the extension module and convert Sybase.py module to used callback error handling. At the end of this process I should have a module which works properly with FreeTDS. - Dave -- http://www.object-craft.com.au |