現在是測試信號標志的程序:
class Process extends Thread{
String op;
Semaphore sem;
Process(String name,String op,Semaphore sem){
super(name);
this.op=op;
this.sem=sem;
start();
}
public void run(){
if(op.compareTo("read")==0){
System.out.println("Trying to get readLock:"+getName());
延伸閱讀
文章來源于領測軟件測試網 http://www.kjueaiud.com/