Intermittent work in UI thread
- From: Pedro Ferreira <none@xxxxxxxx>
- Date: Mon, 15 Oct 2007 19:43:10 +0100
Hi,
I'm trying to create a UI thread to do constant background work, but I'm having some design problems.
The thread needs to fetch records from a database. do some processing on each record and, when there are no more records, sleep for 1 minute before check the database again. The process will be controlled with thread messages (to start, pause, query...).
My problem is where should I put the processing work. I need it to be responsive between cycles, where the process waits for 1 minute, so I can stop it in that period. My only idea is using OnIdle to do the work. But then, how should I make it real idle when waiting for 1 minute?
Could anyone give some hints on what is the way to go?
Thanks
Pedro Ferreira
.
- Follow-Ups:
- Re: Intermittent work in UI thread
- From: David Ching
- Re: Intermittent work in UI thread
- From: Almond
- Re: Intermittent work in UI thread
- From: Joseph M . Newcomer
- Re: Intermittent work in UI thread
- From: Scott McPhillips [MVP]
- Re: Intermittent work in UI thread
- Prev by Date: Re: Wrapping of a String
- Next by Date: Re: CCheckListBox not inheriting high contrast color scheme.
- Previous by thread: Wrapping of a String
- Next by thread: Re: Intermittent work in UI thread
- Index(es):
Relevant Pages
|