同步问题+混淆器问题
有两个.java文件,如A.java 和 B.java
其中a.java的doPost方法部分如下:
public class A extends HttpServlet
{
public void doPost(HttpServletRequest httpservletrequest,HttpServletResponse httpservletresponse)
throws
ServletException,
IOException {
synchronized(B.list)
{
B.list.add(runrecord);
if(B.threads < 1)
{
B.threads++;
B b = new B();
}
}
}
}
B.java的run方法代码如下:
public class B extends Thread
{
public B()
{
start();
}
public void run()
{
_$1537 = DBConfig.getConn();
_L2:
RunRecord runrecord;
try
{
label0:
{
synchronized(list)
{
if(!list.isEmpty())
break label0;
_$1537.close();
threads = threads <= 0