Article View: borland.public.jbuilder.java.language
Article #17380Threads
From: Vladimir Olenin
Date: Mon, 16 Nov 1998 00:00
Date: Mon, 16 Nov 1998 00:00
60 lines
2032 bytes
2032 bytes
This is a multi-part message in MIME format.
--------------2E151C77EECEE3592C96FC37
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit
Hi,
I hava the following:
public class Connection extens Thread{
public Connection(){
.....
this.start();
}
public void run(){
.....
}
public void closeConnection(){
.....
if(this.isAlive()) // THE PROGRAM
this.stop(); // HANGS HERE !!!
}
}
When i try to stop the thread, the program just hangs. I suppose it's a
problem of synchronization. Any help at all would be very appreciated.
It'd be great to have an example or link to some tutorial concerning
threads.
Vladimir
--
>~~~~~~~~<=============>~~~~~~~~<
Be yourself no matter what they say...
Join in Java community now!
http://www.geocities.com/SiliconValley/Heights/9815
>~~~~~~~~<=============>~~~~~~~~<
--------------2E151C77EECEE3592C96FC37
Content-Type: text/x-vcard; charset=koi8-r;
name="keenonjava.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir Olenin
Content-Disposition: attachment;
filename="keenonjava.vcf"
begin:vcard
n:Vladimir;Olenin
x-mozilla-html:FALSE
adr:version:2.1;;;;;;
version:2.1
email;internet:keenonjava@collegemail.com
note:Java programmer. Open for project development offers. See my home page at: http://www.geocities.com/SiliconValley/Heights/9815/
end:vcard
--------------2E151C77EECEE3592C96FC37--
Technical Details
Message-ID:
<365078D0.6AC9F125@collegemail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,193974b4bf6e2907,start X-Google-Attributes: gidf74b3,public From: Vladimir Olenin <keenonjava@collegemail.com> Subject: Threads Date: 1998/11/16 Message-ID: <365078D0.6AC9F125@collegemail.com> X-Deja-AN: 412529592 X-Accept-Language: en,ru Content-Type: multipart/mixed; boundary="------------2E151C77EECEE3592C96FC37" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language