async task in python gtk3 -


my app has gtk.grid , children loaded dynamically

for item in self.read_items_from_file():     # ...     self.my_grid.attach(self.build_widget(item), col, row, 1, 1) 

for each item built widget , widget image generated.

this process takes time , wanna convert previous code in asynctask.

how can achieve this?

i'm using python3 , gtk+3.0 , ubuntu


update using futures

i'm trying use futures nothing happens windows shown items not attached grid, code

def attach(item):     # ...     self.my_grid.attach(self.build_widget(item), col, row, 1, 1)    futures.processpollexecutor() executor:     executor.map(attach, self.read_items_from_file()) 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -