🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #20768

Re: [java��]������ֹһ���̵߳����У�

#20768
From: don
Date: Mon, 15 Dec 2003 16:35
34 lines
2941 bytes
�����ʱ����isinterrupted�ķ������Dz��е�
core java���ᵽ��Ҳ���Ƕ��ڷ�����Ķ���
����
try{
  while(!interrupted)
  {
    Thread.currentThread().interrupt();
  }
}catch(InterruptedException e)
{
}
������Ȼ�Ƴ������׸��쳣�Ƴ�
Ҫ��������whileѭ�����ˣ���Ҳû���Ƴ���

�� �� jungleboy (���˹�) �Ĵ������ᵽ: ��
: ��������������core java �ڶ��������ᵽ���ƺ�����isInterrupted()��
: interrupted()�������������������Ҳ����ˣ�����������
: �� �� happyrobbie (�DZ��������Ӳ�ʿ) �Ĵ������ᵽ: ��
: : ��Ҳ��������������⣬����Ҫ��һ��������I/O�������߳��ⲿ��������߳�
: : û�뵽ʲô�÷�������������һ�����Ƿ����ķ��������
: : �����߳��ⲿclose������������I/O���������������߳��ڲ�����IJ����ͻ��׳�
: : Exception�������ⲿ�ر�����ʱ��������һ��flag���߳��ڲ���exception handler
: : ���ж�  һ�����flag���������Ҫ�����̣߳���ֱ��return��
: : �������ַ���ij�̶ֳ���  ��exception  handling�����������˳����������
: >>  .................<����ʡ��>............


--
/*----------------------------------*/
(!C++)?JAVA:VB.NET    //���ѡ���е���
��� ����MFC��.NET��JAVA һ���������٣�
/*----------------------------------*/ 

�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: eldon]
Technical Details
Message-ID: <49edFl$A0O@Freecity.dhs.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,a06d199e370a9806
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-15 08:37:15 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newshosting.com!news-xfer2.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity
From: eldon.bbs@Freecity.dhs.org (don)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: [java��]������ֹһ���̵߳����У�
Date: 15 Dec 2003 16:35:38 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <49edFl$A0O@Freecity.dhs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071505919.A