I am using the python sqlite3 module to write the results of batch jobs to a shared .db file. I chose SQLite because several processes may be trying to write at the same time, and as I understand it, SQLite should do this well. I'm not sure what happens when several processes end and try to write at the same time. Therefore, if several processes that look like
conn = connect('test.db') with conn: for v in xrange(10): tup = (str(v), v) conn.execute("insert into sometable values (?,?)", tup)
execute immediately, will they throw an exception? Wait politely for other processes to write? Is there a better way to do this?
python concurrency sqlite3
Shep
source share