«« ( Date ) »» // «« ( Thread ) »» // drs - 2006

Re: Zaustavljanje servera?

by Branko Kokanovic
subota, 03. jun 2006 - 20:12.

ma samo lupi client.close() i resio si posao:D

<disclaimer>
ovo nisam ja izmislio, ali je sigurno ok resenje - procitaj isto na
http://java.sun.com/j2se/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html
heading: What if a thread doesn't respond to Thread.interrupt?
</disclaimer>

poz, kokan

2006/6/3, Ivica B <ibogosavljevic@gmail.com>:
postoji funkcija u ServerSocket da se postavi timeout.


On 6/3/06, Nenad Tesovic <tesovicn@gmail.com> wrote:
>
> U zadatku sa vezbi dat je sledeci kod:
>
> while(thread == myThread)
> {
> try {
> Socket client = listener.accept();
> ...
>
> Proces ne moze da se prekine i ako je thread = null jer on ceka klijente
> (kojih nema) i tako nikada nece doci na proveru uslova petlje.
> Kako zaustaviti server da ne ceka vise?
>
>
>
>
-----------------------------------------------------------------
> unsubscribe:
> minimalist@rti.etf.bg.ac.yu?subject=unsubscribe%20drs
>
-----------------------------------------------------------------
>


-----------------------------------------------------------------
unsubscribe:
minimalist@rti.etf.bg.ac.yu?subject=unsubscribe%20drs
-----------------------------------------------------------------



To summarize: it is a well-known fact that those people who must want
to rule people are, ipso facto, those least suited to do it.
To summarize the summary: anyone capable of getting themselves made
President should by no means be allowed to do the job.
To summarize the summary of the summary: people are a problem.