dcsimg
I have written a client and server application wit...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vijaya_Natarajan
Posted On:   Friday, February 23, 2001 01:41 PM

I have written a client and server application with threads involved. When the client connects and sends a request, the server transfers some files to the client's /tmp directory. The server creates a thread per file. (If there are 10 files, then it creates 10 threads) and each thread will be responsible for transfering each file. On the client's side, I have two types of threads, one thread (monitor thread) will watch how much percentage of the file has been transfered, and another thread (display thread) is responsibile for drawing a graph (showing visually, how much percentage of the file has been transfered etc.). I start the display thread first, an   More>>

I have written a client and server application with
threads involved. When the client connects and
sends a request, the server transfers some files
to the client's /tmp directory. The server creates
a thread per file. (If there are 10 files, then it
creates 10 threads) and each thread will be responsible
for transfering each file.
On the client's side, I have two types of threads,
one thread (monitor thread) will watch how much
percentage of the file has been transfered, and
another thread (display thread) is responsibile
for drawing a graph (showing visually,
how much percentage of the file has been
transfered etc.). I start the display thread first,
and then the monitor thread next in the program.
The display thread wakes up for every 3 seconds, and
the monitor threads wakes for every 5 seconds.
This set-up works fine with JDK1.2. The display thread
wakes up and goes to sleep, the monitor thread wakes
up and goes to sleep and so on and so forth.
but when I compile it under JDK1.3 and run with
JDK1.3, in the beginning of the program the display
thread wakes up and goes to sleep, and for some reason
it never wakes up again, only the monitor thread
wakes up and go back to sleep, after 15 seconds or so,
the display finally wakes up and works fine.
I don't know, what makes the display thread to hang
for the first 15 seconds, and also I feel the program
runs a bit slow with JDK1.3.

I would really appreciate if any one help me with
some suggestions.
Thanks a lot.
Sincerely,
Viji

   <<Less
About | Sitemap | Contact