My ledgerhelpers Python-GTK+ program `addtrans` has this code, which
runs in a separate thread:
def _harvest_accounts_and_last_commodities(self):
# Commodities returned by this method do not contain any
annotations.
accts = []
commos = dict()
print "hanging" # <- IT HANGS HERE
for post in self.journal.query(""):
print "no longer hanging" # <- IT CEASES TO HANG HERE
for post in post.xact.posts():
if str(post.account) not in accts:
accts.append(str(post.account))
comm = post.amount / post.amount
comm.commodity = comm.commodity.strip_annotations()
commos[str(post.account)] = comm
self._accounts_and_last_commodities = (accts, commos)
Why does the UI of my program *hang* when journal.query() is called,
even though it is running in a completely separate thread? Effectively
the question is: why isn't the GTK+ mainloop active when that code runs?
Thanks in advance.
--
Rudd-O
http://rudd-o.com/
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.