1 Star 0 Fork 0

yirenzhixia/JavaBasic

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Producer.java 439 Bytes
Copy Edit Raw Blame History
yirenzhixia authored 2018-08-27 10:33 +08:00 . Java基础代码
package thread.example;
import java.util.concurrent.locks.Lock;
/**
* 生产者
*
* @author ZwT
* @date 2018-05-22 11:15
**/
public class Producer extends Thread{
private Storage storage;
private int count;
public Producer(String name,Storage storage, int count) {
super(name);
this.storage = storage;
this.count = count;
}
public void run(){
storage.production(count);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zwtxm/JavaBasic.git
git@gitee.com:zwtxm/JavaBasic.git
zwtxm
JavaBasic
JavaBasic
master

Search