Commit commands must be within a sqlLock
This commit is contained in:
parent
5cf30c1533
commit
17a8ece5c1
|
@ -1744,7 +1744,9 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.ui.textEditInboxMessage.setText("")
|
self.ui.textEditInboxMessage.setText("")
|
||||||
self.ui.tableWidgetInbox.removeRow(currentRow)
|
self.ui.tableWidgetInbox.removeRow(currentRow)
|
||||||
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
|
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
|
||||||
|
shared.sqlLock.acquire()
|
||||||
shared.sqlSubmitQueue.put('commit')
|
shared.sqlSubmitQueue.put('commit')
|
||||||
|
shared.sqlLock.release()
|
||||||
if currentRow == 0:
|
if currentRow == 0:
|
||||||
self.ui.tableWidgetInbox.selectRow(currentRow)
|
self.ui.tableWidgetInbox.selectRow(currentRow)
|
||||||
else:
|
else:
|
||||||
|
@ -1764,7 +1766,9 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.ui.textEditSentMessage.setPlainText("")
|
self.ui.textEditSentMessage.setPlainText("")
|
||||||
self.ui.tableWidgetSent.removeRow(currentRow)
|
self.ui.tableWidgetSent.removeRow(currentRow)
|
||||||
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
|
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
|
||||||
|
shared.sqlLock.acquire()
|
||||||
shared.sqlSubmitQueue.put('commit')
|
shared.sqlSubmitQueue.put('commit')
|
||||||
|
shared.sqlLock.release()
|
||||||
if currentRow == 0:
|
if currentRow == 0:
|
||||||
self.ui.tableWidgetSent.selectRow(currentRow)
|
self.ui.tableWidgetSent.selectRow(currentRow)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -167,11 +167,12 @@ def doCleanShutdown():
|
||||||
sqlSubmitQueue.put('SELECT address FROM subscriptions')
|
sqlSubmitQueue.put('SELECT address FROM subscriptions')
|
||||||
sqlSubmitQueue.put('')
|
sqlSubmitQueue.put('')
|
||||||
sqlReturnQueue.get()
|
sqlReturnQueue.get()
|
||||||
|
sqlSubmitQueue.put('exit')
|
||||||
sqlLock.release()
|
sqlLock.release()
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
print 'Finished flushing inventory.'
|
print 'Finished flushing inventory.'
|
||||||
printLock.release()
|
printLock.release()
|
||||||
sqlSubmitQueue.put('exit')
|
|
||||||
|
|
||||||
if safeConfigGetBoolean('bitmessagesettings','daemon'):
|
if safeConfigGetBoolean('bitmessagesettings','daemon'):
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user