1
0

WalletSynchronizer had a race condition caused by calling the callback before the Qt event loop (or other initialisation) finished. Ergo we split initialisation and the running of the thread, then use Qt SIGNALs to yield back into the Qt event loop. This ensures that the callback for the servers_list_changed is not called until the main Qt event loop is actually running.

This commit is contained in:
Amir Taaki
2012-08-29 20:49:31 +01:00
parent e61d478a80
commit b3b910d926
4 changed files with 26 additions and 19 deletions

View File

@@ -173,7 +173,8 @@ if __name__ == '__main__':
sys.exit("Error: Unknown GUI: " + options.gui)
gui = gui.ElectrumGui(wallet)
WalletSynchronizer(wallet,True).start()
interface = WalletSynchronizer(wallet, True, gui.server_list_changed)
interface.start()
try:
found = wallet.file_exists