File transfer + thread?

Hi all,

I’'ve managed to monitor incomoming file transfer (as described in the code snippet of post) and it works.

But when I monitor the transfer using the loop (while(!ift.isDone)…), it seems to use a forground thread which takes the hand over all the other threads of the application.

Then I wonder if there’'s a way to monitor incoming (and outgoing) file transfer in background (to avoid to freeze the rest of the application during transfer)??

Thanks for your help!


The example in that thread uses Thread.sleep() so it shouldn’'t hog the CPU…

An example:

public void run() {

while (true) {

if (m_transfer.isDone()) {

// do something



else {

// monitor status


try {



catch (InterruptedException ie) {}



Hey Nojo,

Thx for your reply…

But I’'ve fixed my problem:

It came from thread management with SWT I use for my GUI.

I now manage to monitor cleanly an incoming file transfer without any thread side effects…

NB: SWT is very powerful and clean for GUI layer…I really suggest to use it instead of awt/swing!!

thx for your concern…