🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ��ѧ�߹����߳�����~~~

#21375
From: 46"CoalBH;��ӭ�μӺ�ͿSmalllX�������...
Date: Sat, 06 Dec 2003 15:59
48 lines
4565 bytes
�찡�������Ͼ�Ȼ��������ĸ��ˣ��Ҳ��˼����˷�������������ϣ�����˵��
�������׵ģ����쿴�����ֵ�һ�������ǻ�Ȼ���ʰ�����һ����
�� �� abnertan.bbs@bbs.sjtu.edu.cn (SuPerDeBater�����������ۼ �Ĵ������ᵽ: ��
: ��  ��: Re: ��ѧ�߹����߳�����~~~
: ����վ: ��ˮ˼Դ (Sat Dec  6 23:21:23 2003)
: ת��վ: PKU!news.happynet.org!news.ccie.net.cn!SJTU
: 
: �Ҿ���ѧϰJavaThreadӦ��������¼������⣺
: 1��wait/notify/notifyAll ��������synchronized method/code block�е��á�
: 2��Java��ÿ�������ж��������ԣ����������������Object class�ж���ģ��κ�
: ���󶼿��Ե��á�
: JavaĿǰֻ֧�ֵ���������һ��Σ�����synchronized �����ܿ緽��ʹ�á���JDK1.5��
: ������ƣ�
: 3����ÿ��������Javaά�������أ�synchronized pool��waited pool��ǰ�ߴ������
: synchronized method/block������̣߳�����Ҫ����-notify��ֻҪ�������ͷţ�
: �Զ�������������ߴ�ŵ�����wait()������������̣߳���Ҫ����-notify����
: 4��Ҫ��ö�����ֻ�н���synchronized method/block��Ҫ�ͷŶ�������Ե���wa
: it()�������˳�synchronized method/block
: 5��wait()��sleep()����������ǰ���ͷŶ��������߲��ͷš�
: 6����������application��ͨ��hard code��killһ���̣߳�����Ҫ��ô��������ʹ
: ��destroy()��������ʵ���������JDK��û��ʵ�֣�����һ���þͻ��׳��쳣��JDK����
: 
: ͨ������취���˳��̵߳ģ�
: 
: �� �� SmallX@bbs.pku.edu.cn (46"CoalBH;��ӭ�μӺ�ͿSmalllX��� �Ĵ������ᵽ: ��
: : ����˵ synchronized ��ʵ����һ��������һ���߳̽����ʱ���Ͱ� synchronized 
: : ��Ķ������ֱ�����˿�ŰѶ��������ֹ�����߳����ڼ�ı�������
: : //Java                            //Nature Language
: : synchronized(obj){                lock(obj);
: :    ...                   <=>          ...
: : }                                 unlock(obj);
: : ��֪�����ĶԲ��ԣ�Java�������ĵ����˵�IJ������ס�
: : ��ô��wait()��notify()��ʲô��˼������ôҪ�����Ƕ�� synchronized ��ߣ�
: : �Ҿ��û��� resume(), suspend() �����һЩ��һ������һ���ָ�������Java������
: : �ĵ����˵���Ƽ�������wait()��notify()����ʲô��˼����Ϊʲô������� synchronized
: : .................������ʡ�ԣ�
: --
: �� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 218.1.31.110]


--
A.B C.D.E F.G.a.b c
��con bravura��
Zzzzzzz  
  
  

�� ��Դ:������δ��վ bbs.pku.edu.cn��[FROM: 162.105.210.90]
Technical Details
Message-ID: <49Xajg$AGO@bbs.pku.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.tiscali.ch!feed.news.tiscali.de!newsfeed.icl.net!newsfeed.fjserv.net!c03.atl99!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,ef18faa692e03db6
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-06 08:00:51 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.tiscali.ch!feed.news.tiscali.de!newsfeed.icl.net!newsfeed.fjserv.net!c03.atl99!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU
From: SmallX@bbs.pku.edu.cn (46"CoalBH;��ӭ�μӺ�ͿSmalllX���������)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: ��ѧ�߹����߳�����~~~
Date: 06 Dec 2003 15:59:51 GMT
Organization: ����δ��վ
Message-ID: <49Xajg$AGO@bbs.pku.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1070726298.A
Lines: 48