🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: synchronize ������ʲô��

#21636
From: �����ơ��������λλ�
Date: Fri, 21 Nov 2003 16:06
33 lines
1936 bytes
����б��;�����Է���producer1����producer2�Ļ�,����д���Ƿ��̰߳�ȫ
����:
class A{
somclass flag1;
public producer1(){
....
}
public producer2(){
...
}
public a(){
synchronized(flag1)(procedure1();)
synchronized(flag1)(procedure2();)
}
}
�߳�a ����a����
�߳�b����ͬʱ����procedure1()��procedure2();�޸���Ӧ���

�� �� halis.bbs@bbs.nankai.edu.cn (��������-98cs-McGill-Maste �Ĵ������ᵽ: ��
: �϶�����ѽ��Ϊʲô���أ�
: �ܲ���˵˵��ʲôʱ��֤��3�����⣿
: �� �� minnow.bbs@bbs.sjtu.edu.cn (���˹ȵ�С���) �Ĵ������ᵽ: ��
: : ʵ��֤��3��һ��
: : .................������ʡ�ԣ�


--
      ,,
  ___(  )___
 /          \      ����һֻСС��
/\/\/\||/\/\/\
      ^^
�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 202.120.19.13]
Technical Details
Message-ID: <49M2Oi$9qJ@bbs.sjtu.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!SJTU

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,c9ab9e1b3e5ada2a
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-11-21 08:06:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!SJTU
From: pwlazy.bbs@bbs.sjtu.edu.cn ( �����ơ��������λλ�)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: synchronize ������ʲô��
Date: 21 Nov 2003 16:06:36 GMT
Organization: ��ˮ˼Դ
Message-ID: <49M2Oi$9qJ@bbs.sjtu.edu.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1069430444.A