Active Topics

 


Reply
Thread Tools
Posts: 58 | Thanked: 31 times | Joined on Nov 2010
#1
Hi,
I'm writing currently a app, which fetches different content from various sites. I am using Threads for preventing the interface from freezing. The Update-Process is splitt into currently 4 Sites, every site is a Thread. How do I get Python to start one Thread and after this one is finished, start another one?

The basic Idea is simple, by doing something like this:
Code:
update_ntv = updateNTVall("none","none")
update_ntv.begin()
fenster.connect(update_ntv, SIGNAL("finished()"), starteEngadget)
I get the app to first update NTV (German News Site) and then start the Engadget-Thread and afterwards a special routine out off my code.

Since I'm on my way to implement more and more Sites it kinda sucks to do this for every site. It would be nice to create a list of Threads eg: (NTV.begin,engadget.begin) and then triggger it Thread by Thread (everytime one Thread is finished - start another one). A while-loop let's the interface freeze again.

Any ideas?

Blck
 
Posts: 1,038 | Thanked: 737 times | Joined on Nov 2005 @ Helsinki
#2
Why not use a single thread instead and put each of the sites to be scanned in that thread, one at a time?
 
Posts: 58 | Thanked: 31 times | Joined on Nov 2010
#3
Hi,
thanks for your answer konttori. Unfortunately this isn't possible, as this would be followed by redisgning the app. The Update-Thread for each site is different and a bit complex.
Thath's why executing a list (something like that) would acutally be great.

MfG Blck
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:27.