🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#21349
From: 46"CoalBH;��ӭ�μӺ�ͿSmalllX�������...
Date: Fri, 05 Dec 2003 15:21
26 lines
2582 bytes
����˵ synchronized ��ʵ����һ��������һ���߳̽����ʱ���Ͱ� synchronized 
��Ķ������ֱ�����˿�ŰѶ��������ֹ�����߳����ڼ�ı�������
//Java                            //Nature Language
synchronized(obj){                lock(obj);
   ...                   <=>          ...
}                                 unlock(obj);
��֪�����ĶԲ��ԣ�Java�������ĵ����˵�IJ������ס�

��ô��wait()��notify()��ʲô��˼������ôҪ�����Ƕ�� synchronized ��ߣ�
�Ҿ��û��� resume(), suspend() �����һЩ��һ������һ���ָ�������Java������
�ĵ����˵���Ƽ�������wait()��notify()����ʲô��˼����Ϊʲô������� synchronized
��߰�����ֻ�������ָ�ijһ�����̣߳��ֲ���Ҫ�̼߳乲����ݡ�˭���ͽ��Ͱɡ�

�� �� pwlazy.bbs@bbs.sjtu.edu.cn ( �����ơ��������λλ�) �Ĵ������ᵽ: ��
:                  ~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~
:                        ����û����ǶԵ�ǰ�������                       


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

�� ��Դ:������δ��վ bbs.pku.edu.cn��[FROM: 162.105.210.90]
Technical Details
Message-ID: <49WjgR$9uI@bbs.pku.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!priapus.visi.com!orange.octanews.net!news.octanews.net!news-out.visi.com!petbe.visi.com!newshosting.com!news-xfer1.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!maily.cic.tsinghua.edu.cn!news.happynet.org!PKU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,4a23158f6712ec04
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-05 07:22:30 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!priapus.visi.com!orange.octanews.net!news.octanews.net!news-out.visi.com!petbe.visi.com!newshosting.com!news-xfer1.atl.newshosting.com!167.206.3.103.MISMATCH!news3.optonline.net!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: 05 Dec 2003 15:21:50 GMT
Organization: ����δ��վ
Message-ID: <49WjgR$9uI@bbs.pku.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1070636283.A
Lines: 26