B
BlackLight
Hi,
I would like to know if there's a way to make in Java two or more
indipendent threads, without freezing one of them (such as with join() and
yield() methods) on one side and without letting one of them terminate
before its natural end on the other.
In my case, I'm trying to develop a NMAP-like port scanner with GUI. Once
pressed the button "Scan" on the main frame a new thread starts to scan
all the open ports on the remote host. But if I don't specify anything the
thread stops in a while, often without finding any open port, while, if I
use the join() method on the main thread or something like:
while (t.isAlive()) Thread.yield();
the main frame freezes until the other process is ended.
Hope you can help me.
Thanks.
I would like to know if there's a way to make in Java two or more
indipendent threads, without freezing one of them (such as with join() and
yield() methods) on one side and without letting one of them terminate
before its natural end on the other.
In my case, I'm trying to develop a NMAP-like port scanner with GUI. Once
pressed the button "Scan" on the main frame a new thread starts to scan
all the open ports on the remote host. But if I don't specify anything the
thread stops in a while, often without finding any open port, while, if I
use the join() method on the main thread or something like:
while (t.isAlive()) Thread.yield();
the main frame freezes until the other process is ended.
Hope you can help me.
Thanks.