Ignorance is not bliss

Aahz Maruch aahz at panix.com
Sat Jan 26 12:26:11 EST 2002


In article <1pp48.143$Ub7.5541 at eagle.america.net>,
Mark Sass <sassman at nucentrix.net> wrote:
>
>    I am trying to use threads to make something happen in parallel, and my
>poor procedural driven mind is lost.  Basically, I want to write to two
>separate databases using the mxODBC driver at the same time and be able to
>compare the return values to insure that the writes succeeded (the same
>number of writes are done to each database).  When I use threads to do this,
>I cannot seem to make it work.  I was doing the writes serially, but I ran
>into problems on large updates taking too long causing data problems, so I
>need the writes done in parallel.  I guess my mind was not made for parallel
>operations.  Can anyone point me to an example of parallel actions ?  I am
>doing this on Win2k if it matters.

First of all, make sure that you have two instances of mxODBC, one for
each database.  Then you need to write code to synchronize the two
threads once they finish writing.  Take a look at
http://starship.python.net/crew/aahz/
-- 
                      --- Aahz  <*>  (Copyright 2002 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"I support family values -- Addams family values" --www.nancybuttons.com



More information about the Python-list mailing list