Just figured it out, hope it's helpful to someone.<div><br class="webkit-block-placeholder"></div><div><div>import threading</div><div>import time</div><div>from ZODB import DB,FileStorage</div><div>import transaction</div>
<div><br class="webkit-block-placeholder"></div><div>class myThread(threading.Thread):</div><div> def run(self):</div><div> time.sleep(1)</div><div> print "Access from thread"</div><div> threadConn =
db.open()</div><div> threadRoot = threadConn.root()</div><div> print "The root as opened by the thread:",threadRoot</div><div> print "Main writing to the root"</div><div> threadRoot['thread']=1
</div><div> print "Committing transcation"</div><div> transaction.commit()</div><div><br class="webkit-block-placeholder"></div><div>newThread = myThread()</div><div><br class="webkit-block-placeholder">
</div><div>storage = FileStorage.FileStorage('data.fs')</div><div>db = DB(storage)</div><div><br class="webkit-block-placeholder"></div><div>newThread.start()</div><div>print "Access from main"</div><div>
mainConn = db.open()</div><div><br class="webkit-block-placeholder"></div><div>mainRoot = mainConn.root()</div><div>print "The root as opened by the main:",mainRoot</div><div>print "Main writing to the root"
</div><div>mainRoot['main']=1</div><div>print "Committing transaction"</div><div>transaction.commit()</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div>
<div>newThread.join()</div><div><br class="webkit-block-placeholder"></div><div>Regards,</div><div>Kenneth Miller</div></div>