Re: Threads and notification when finished



Raising events from the thread would be a typical way. Another would be
through a callback.

-Chris

"Tobias Matzat" <tobiasmatzat@xxxxxxxxxx> wrote in message
news:43592cdc$0$12674$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi!
>
> I am writing an application that should fetch some data in the background.
> Each file should be downloaded in a thread. Afterwards I would like to
> display the results in a document in the mobile internet explorer. Well,
> async callback couldn't be used in the cf 2.0. How could it be made
> possible that each thread notices the main thread when his task is done?
> Events? I mean diplay a wait cursor and wait until all threads have
> finished. It depends on your internet connection how long a download
> lasts. Therefore I cannot simply put the main thread to sleep.
> But when there are more threads downloading files? Can I get information
> about all running threads? I mean, is a special thread running or not.
> Could that be made with cf 2.0?
>
> THX!
>
> Tobias


.



Relevant Pages

  • Re: URLDownloadToFile
    ... >> To avoid hang of GUI, if to make use of the URLDownloadToFile() ... >> callback, inside the callback, peek and dispatch messages waiting in ... How does URLOpenPullStream"control the amount of Internet access for the ...
    (microsoft.public.vc.language)
  • Re: LWP module - parse one line at a time (only download part of a page)
    ... >> interested in two or three lines, I don't want to download the whole ... > In particular note the existance of the callback and the bit where it ... response the desired string can be. ... the upper limit turns out to be set too low, and you miss things that the ...
    (comp.lang.perl.modules)
  • Re: Tk and LWP?
    ... LWP::UserAgent for this but the problem is then when I download a huge file ... LWP supports a progress callback(shown below), ... But if you really want a smooth gui, put the lwp stuff in a thread. ...
    (comp.lang.perl.tk)
  • Re: Partial download with ftplib and retrbinary
    ... I have a callback ... with retrbinary that raises an exception and ends the download. ...     global count,localfile,number ... The server hangs on because the data connection is left open. ...
    (comp.lang.python)