Re: Do I need Threads for this?
- From: <nospam@xxxxxxxxxxxxxxx>
- Date: Tue, 5 Dec 2006 16:17:47 -0000
Presumably the thread which is doing the file-copying will update some
region in memory, recording it's progress. E.g. "Okay, I'm done with file
#4... now I'm done with #5... #6...", periodically releasing the CPU
Well yes - as in my original code -
mycopyOverFileMethod();
count++;
label.setText("Files Copied:" + count);
- this copies the file, when that's done, surely, the thread continues onto
count++ (recording in memory where its got to) and then sets the label.
Why does my label not update before going back around in the for loop to do
another file copy? Surely the processor is freed up to do the lines after
the mycopyOverFileMethod() before doing this method again? That's why I'm
confused!
.
- Follow-Ups:
- Re: Do I need Threads for this?
- From: Oliver Wong
- Re: Do I need Threads for this?
- From: Colin Miller
- Re: Do I need Threads for this?
- References:
- Do I need Threads for this?
- From: nospam
- Re: Do I need Threads for this?
- From: DRS.Usenet@xxxxxxxxxxxxxxxx
- Re: Do I need Threads for this?
- From: nospam
- Re: Do I need Threads for this?
- From: Oliver Wong
- Do I need Threads for this?
- Prev by Date: Re: Is there a free software to show Java classes' relationship?
- Next by Date: Newbie question-- where to put java class file in Tomcat server
- Previous by thread: Re: Do I need Threads for this?
- Next by thread: Re: Do I need Threads for this?
- Index(es):
Relevant Pages
|