当前位置:首页 » 编程语言 » java生产者消费者

java生产者消费者

发布时间: 2022-06-29 01:22:08

1. java中生产者和消费者问题

好不好,要看情况,单这样,提不提都问题不大。

类的架构,由设计者决定。

this 是指当前类的当前实例

2. java多生产者和多消费者

public static void main(String[] args) {
Buffer buffer=new Buffer(); //创建一个临界区对象
new Procer(buffer,100).start(); //创建一个生产者对象,并启动其线程
new Consumer(buffer,200).start(); //创建一个消费者对象,并启动其线程
new Consumer(buffer,201).start(); //创建第二个消费者对象,并启动其线程
}

这一段代码,多加入
new Consumer(buffer,201).start(); //创建第二个消费者对象,并启动其线程
多加一段代码创建一个消费者
多加入
new Procer(buffer,100).start();
创建一个生产者。
想要很多生产者和消费者?加就是了啊。

第四个文件 Buffer.java
这个是实现同步的主要缓存类。想要实现同步
在每个方法的声明前都加入synchronized 就行
synchronized 线程锁,很好用的。源代码已经加入了
就比如
public synchronized void put(int value) { //同步方法控制临界区内容写入

3. java实现生产者和消费者问题的几种方式

生产者消费者问题是多线程的一个经典问题,它描述是有一块缓冲区作为仓库,生产者可以将产品放入仓库,消费者则可以从仓库中取走产品。
解决生产者/消费者问题的方法可分为两类:
采用某种机制保护生产者和消费者之间的同步;
在生产者和消费者之间建立一个管道。
第一种方式有较高的效率,并且易于实现,代码的可控制性较好,属于常用的模式。第二种管道缓冲区不易控制,被传输数据对象不易于封装等,实用性不强。
在Java中有四种方法支持同步,其中前三个是同步方法,一个是管道方法。
wait()
/
notify()方法
await()
/
signal()方法
BlockingQueue阻塞队列方法
PipedInputStream
/
PipedOutputStream
通过
wait()
/
notify()方法实现:
wait()
/
nofity()方法是基类Object的两个方法:
wait()方法:当缓冲区已满/空时,生产者/消费者线程停止自己的执行,放弃锁,使自己处于等等状态,让其他线程执行。
notify()方法:当生产者/消费者向缓冲区放入/取出一个产品时,向其他等待的线程发出可执行的通知,同时放弃锁,使自己处于等待状态。
通过await()
/
signal()方法实现:
await()和signal()的功能基本上和wait()
/
nofity()相同,完全可以取代它们,但是它们和新引入的锁定机制Lock直接挂钩,具有更大的灵活性。通过在Lock对象上调用newCondition()方法,将条件变量和一个锁对象进行绑定,进而控制并发程序访问竞争资源的安全。
通过BlockingQueue方法实现:
它是一个已经在内部实现了同步的队列,实现方式采用的是我们第2种await()
/
signal()方法。它可以在生成对象时指定容量大小。它用于阻塞操作的是put()和take()方法:
put()方法:类似于我们上面的生产者线程,容量达到最大时,自动阻塞。
take()方法:类似于我们上面的消费者线程,容量为0时,自动阻塞。

4. java 生产者/消费者问题

/**
* 公共资源类
*/
public class PublicResource {
private int number = 0;
/**
* 增加公共资源
*/
public synchronized void increace() {
while (number != 0) {
try {
wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
number++;
System.out.println(number);
notify();
}
/**
* 减少公共资源
*/
public synchronized void decreace() {
while (number == 0) {
try {
wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
number--;
System.out.println(number);
notify();
}
}

/**

* 生产者线程,负责生产公共资源
*/
public class ProcerThread implements Runnable {
private PublicResource resource;
public ProcerThread(PublicResource resource) {
this.resource = resource;
}
@Override
public void run() {
for (int i = 0; i < 10; i++) {
try {
Thread.sleep((long) (Math.random() * 1000));
} catch (InterruptedException e) {
e.printStackTrace();
}
resource.increace();
}
}
}
/**
* 消费者线程,负责消费公共资源
*/
public class ConsumerThread implements Runnable {
private PublicResource resource;
public ConsumerThread(PublicResource resource) {
this.resource = resource;
}
@Override
public void run() {
for (int i = 0; i < 10; i++) {
try {
Thread.sleep((long) (Math.random() * 1000));
} catch (InterruptedException e) {
e.printStackTrace();
}
resource.decreace();
}
}
}

public class ProcerConsumerTest {
public static void main(String[] args) {
PublicResource resource = new PublicResource();
new Thread(new ProcerThread(resource)).start();
new Thread(new ConsumerThread(resource)).start();
new Thread(new ProcerThread(resource)).start();
new Thread(new ConsumerThread(resource)).start();
new Thread(new ProcerThread(resource)).start();
new Thread(new ConsumerThread(resource)).start();
}
}

5. Java线程生产者消费者问题

你的消费者线程先启动的,因为index==0,所以进入了等待模式,而生产者线程没有在push了之后进行唤醒,导致了问题。
测试在push方法中的index++后面添加notifyAll()方法可以解决该问题:
index++;
this.notifyAll();
Thread-1生产了1号馒头
Thread-0消费了第1个馒头
Thread-1生产了2号馒头
Thread-0消费了第2个馒头
Thread-1生产了3号馒头
Thread-0消费了第3个馒头
Thread-1生产了4号馒头
Thread-0消费了第4个馒头
Thread-1生产了5号馒头
Thread-0消费了第5个馒头
Thread-1生产了6号馒头
Thread-0消费了第6个馒头
Thread-1生产了7号馒头
Thread-0消费了第7个馒头
Thread-1生产了8号馒头
Thread-0消费了第8个馒头
Thread-1生产了9号馒头
Thread-0消费了第9个馒头

6. Java线程生产者与消费者

改成这样就可以了

class WoTou {
int id;
WoTou(int id) {
this.id=id;
}
public String toString() {
return "WoTou"+id;
}
}

class SynStack {
WoTou[] ss = new WoTou[6];
int index;
SynStack(int index) {
this.index=index;
}
public synchronized void push(WoTou wt) {
while(index==ss.length) {
try {
this.wait();
}catch (InterruptedException e) {
e.printStackTrace();
}

}
this.notify();
ss[index]=wt;
index++;

}
public synchronized WoTou pop() {
while(index==0) {
try {
this.wait();
}catch(InterruptedException e) {
e.printStackTrace();
}

}
this.notify();
index--;
return ss[index];

}
}

class Procer implements Runnable{
SynStack syn;
Procer(SynStack syn) {
this.syn=syn;
}
public void proceWoTou() {
for(int i=0;i<20;i++) {
WoTou wt = new WoTou(i);
syn.push(wt);
System.out.println("生产了一个"+wt);
try {
Thread.sleep(200);
} catch(InterruptedException e) {
e.printStackTrace();
}
}

}
public void run() {
this.proceWoTou();

}
}

class Consumer implements Runnable{
SynStack syn;
Consumer(SynStack syn) {
this.syn=syn;
}
public void consumerWoTou() {
for(int i=0;i<20;i++) {
WoTou wt=syn.pop();
System.out.println("消费了一个"+wt);
try {
Thread.sleep(500);
}catch(InterruptedException e) {
e.printStackTrace();
}
}

}
public void run() {
this.consumerWoTou();

}
}

public class ProcerConsumer {
public static void main(String[] args) {
SynStack syn = new SynStack(0);
Procer p = new Procer(syn);
Consumer c = new Consumer(syn);
new Thread(p).start();
new Thread(c).start();
}
}

7. java 生产者与消费者 的简单问题

1 toString是在控制台打印对象的时候会调用的对象的方法。。比如你定义个Sx对象sx。。然后System.out.println(sx);就会先调用sx的toString方法。。将得到的String对象打印在控制台。。每个类都继承自Object。。Object类里面有个toString方法。。返回的是该对象在内存中的地址。。如果你不重写这个方法。。打印出来的东西你看不明白的。。
2 java中数据类型有基本类型(int那些)和引用类型(就是所谓的对象)。。java中数组是对象。。每个数组对象都有一个length属性。。值是这个数组的元素个数。。对象调用属性是不需要括号的。。方法才需要。。
3 kuang ss=null;就是定义一个kuang对象ss。。其初始值为null。。为null的对象在内存中什么都没有
int index=0; Wotou[] tou=new Wotou[6];这两个都不是为空的。。都有具体的初始值。。
4 Wotou wt=ss.pop();表示定义一个Wotou对象wt。。并将调用ss对象的pop方法的返回值赋值给wt对象。。具体你看下kuang 类的pop方法就知道了。。

8. JAVA模拟生产者与消费者实例

使用的生产者和消费者模型具有如下特点:
(1)本实验的多个缓冲区不是环形循环的,也不要求按顺序访问。生产者可以把产品放到目前某一个空缓冲区中。
(2)消费者只消费指定生产者的产品。
(3)在测试用例文件中指定了所有的生产和消费的需求,只有当共享缓冲区的数据满足了所有关于它的消费需求后,此共享缓冲区才可以作为空闲空间允许新的生产者使用。
(4)本实验在为生产者分配缓冲区时各生产者间必须互斥,此后各个生产者的具体生产活动可以并发。而消费者之间只有在对同一产品进行消费时才需要互斥,同时它们在消费过程结束时需要判断该消费对象是否已经消费完毕并清除该产品。
Windows
用来实现同步和互斥的实体。在Windows
中,常见的同步对象有:信号量(Semaphore)、
互斥量(Mutex)、临界段(CriticalSection)和事件(Event)等。本程序中用到了前三个。使用这些对象都分
为三个步骤,一是创建或者初始化:接着请求该同步对象,随即进入临界区,这一步对应于互斥量的
上锁;最后释放该同步对象,这对应于互斥量的解锁。这些同步对象在一个线程中创建,在其他线程
中都可以使用,从而实现同步互斥。当然,在进程间使用这些同步对象实现同步的方法是类似的。
1.用锁操作原语实现互斥
为解决进程互斥进人临界区的问题,可为每类临界区设置一把锁,该锁有打开和关闭两种状态,进程执行临界区程序的操作按下列步骤进行:
①关锁。先检查锁的状态,如为关闭状态,则等待其打开;如已打开了,则将其关闭,继续执行步骤②的操作。
②执行临界区程序。
③开锁。将锁打开,退出临界区。
2.信号量及WAIT,SIGNAL操作原语
信号量的初值可以由系统根据资源情况和使用需要来确定。在初始条件下信号量的指针项可以置为0,表示队列为空。信号量在使用过程中它的值是可变的,但只能由WAIT,SIGNAL操作来改变。设信号量为S,对S的WAIT操作记为WAIT(S),对它的SIGNAL操作记为SIGNAL(S)。
WAIT(S):顺序执行以下两个动作:
①信号量的值减1,即S=S-1;
②如果S≥0,则该进程继续执行;
如果
S(0,则把该进程的状态置为阻塞态,把相应的WAITCB连人该信号量队列的末尾,并放弃处理机,进行等待(直至其它进程在S上执行SIGNAL操作,把它释放出来为止)。
SIGNAL(S):顺序执行以下两个动作
①S值加
1,即
S=S+1;
②如果S)0,则该进程继续运行;
如果S(0则释放信号量队列上的第一个PCB(既信号量指针项所指向的PCB)所对应的进程(把阻塞态改为就绪态),执行SIGNAL操作的进程继续运行。
在具体实现时注意,WAIT,SIGNAL操作都应作为一个整体实施,不允许分割或相互穿插执行。也就是说,WAIT,SIGNAL操作各自都好像对应一条指令,需要不间断地做下去,否则会造成混乱。
从物理概念上讲,信号量S)时,S值表示可用资源的数量。执行一次WAIT操作意味着请求分配一个单位资源,因此S值减1;当S<0时,表示已无可用资源,请求者必须等待别的进程释放了该类资源,它才能运行下去。所以它要排队。而执行一次SIGNAL操作意味着释放一个单位资源,因此S值加1;若S(0时,表示有某些进程正在等待该资源,因而要把队列头上的进程唤醒,释放资源的进程总是可以运行下去的。
---------------
/**
*
生产者
*
*/
public
class
Procer
implements
Runnable{
private
Semaphore
mutex,full,empty;
private
Buffer
buf;
String
name;
public
Procer(String
name,Semaphore
mutex,Semaphore
full,Semaphore
empty,Buffer
buf){
this.mutex
=
mutex;
this.full
=
full;
this.empty
=
empty;
this.buf
=
buf;
this.name
=
name;
}
public
void
run(){
while(true){
empty.p();
mutex.p();
System.out.println(name+"
inserts
a
new
proct
into
"+buf.nextEmptyIndex);
buf.nextEmptyIndex
=
(buf.nextEmptyIndex+1)%buf.size;
mutex.v();
full.v();
try
{
Thread.sleep(1000);
}
catch
(InterruptedException
e)
{
e.printStackTrace();
}
}
}
}
---------------
/**
*
消费者
*
*/
public
class
Customer
implements
Runnable{
private
Semaphore
mutex,full,empty;
private
Buffer
buf;
String
name;
public
Customer(String
name,Semaphore
mutex,Semaphore
full,Semaphore
empty,Buffer
buf){
this.mutex
=
mutex;
this.full
=
full;
this.empty
=
empty;
this.buf
=
buf;
this.name
=
name;
}
public
void
run(){
while(true){
full.p();
mutex.p();
System.out.println(name+"
gets
a
proct
from
"+buf.nextFullIndex);
buf.nextFullIndex
=
(buf.nextFullIndex+1)%buf.size;
mutex.v();
empty.v();
try
{
Thread.sleep(1000);
}
catch
(InterruptedException
e)
{
e.printStackTrace();
}
}
}
}
-------------------------
/**
*
缓冲区
*
*/
public
class
Buffer{
public
Buffer(int
size,int
nextEmpty,int
nextFull){
this.nextEmptyIndex
=
nextEmpty;
this.nextFullIndex
=
nextFull;
this.size
=
size;
}
public
int
size;
public
int
nextEmptyIndex;
public
int
nextFullIndex;
}
-----------------
/**
*
此类用来模拟信号量
*
*/
public
class
Semaphore{
private
int
semValue;
public
Semaphore(int
semValue){
this.semValue
=
semValue;
}
public
synchronized
void
p(){
semValue--;
if(semValue<0){
try
{
this.wait();
}
catch
(InterruptedException
e)
{
e.printStackTrace();
}
}
}
public
synchronized
void
v(){
semValue++;
if(semValue<=0){
this.notify();
}
}
}
------------------------
public
class
Test
extends
Thread
{
public
static
void
main(String[]
args)
{
Buffer
bf=new
Buffer(10,0,0);
Semaphore
mutex=new
Semaphore(1);
Semaphore
full=new
Semaphore(0);
Semaphore
empty=new
Semaphore(10);
//new
Thread(new
Procer("p001",mutex,full,empty,bf)).start();
Procer
p=new
Procer("p001",mutex,full,empty,bf);
new
Thread(new
Procer("p002",mutex,full,empty,bf)).start();
new
Thread(new
Procer("p003",mutex,full,empty,bf)).start();
new
Thread(new
Procer("p004",mutex,full,empty,bf)).start();
new
Thread(new
Procer("p005",mutex,full,empty,bf)).start();
try{
sleep(3000);
}
catch(Exception
ex)
{
ex.printStackTrace();
}
new
Thread(new
Customer("c001",mutex,full,empty,bf)).start();
new
Thread(new
Customer("c002",mutex,full,empty,bf)).start();
new
Thread(new
Customer("c003",mutex,full,empty,bf)).start();
new
Thread(new
Customer("c004",mutex,full,empty,bf)).start();
new
Thread(new
Customer("c005",mutex,full,empty,bf)).start();
}
}
--------------------------------------------

9. java 多线程 生产者-消费者问题

为空、是否已满,容器没有自定义的话,就要在线程类中每次生产之前判断容器是否已满(这个已经由容器判断),在消费时要判断容器是否为空

2、一般,线程同步最好用synchronized关键字锁定同步代码,然后通过wait()和notify()方法实现线程同步,不过容器容量大一点才能看到效果。代码如下:
class BQProc implements Runnable {
private BlockingQueue<Integer> queue;

public BQProc(BlockingQueue<Integer> queue) {
this.queue = queue;
}

public void run() {
synchronized(queue) {
for (int proct = 1; proct <= 10; proct++) {

try {
if(queue.size() == 5) {
queue.wait();
}
queue.put(proct);// 放进去一个
System.out.println("放在 --> " + this.queue.size());
queue.notify();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}

class BQConsume implements Runnable {
private BlockingQueue<Integer> queue;

public BQConsume(BlockingQueue<Integer> queue) {
this.queue = queue;
}

public void run() {
synchronized(queue) {
for (int i = 1; i <= 10; i++) {
try {
if(queue.isEmpty()) {
queue.wait();
}
System.out.println("拿出 <-- " + this.queue.size());
queue.take();// 拿出来一个
queue.notify();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}
运行结果:
放在 --> 1
放在 --> 2
放在 --> 3
放在 --> 4
放在 --> 5
拿出 <-- 5
拿出 <-- 4
拿出 <-- 3
拿出 <-- 2
拿出 <-- 1
放在 --> 1
放在 --> 2
放在 --> 3
放在 --> 4
放在 --> 5
拿出 <-- 5
拿出 <-- 4
拿出 <-- 3
拿出 <-- 2
拿出 <-- 1

PS:当基数大到一定程度才可以看到想要的结果
3、如果一定要用Thread.sleep()实现的话可以用循环控制,代码如下:

class BQProc implements Runnable {
private BlockingQueue<Integer> queue;

public BQProc(BlockingQueue<Integer> queue) {
this.queue = queue;
}

public void run() {
for (int proct = 1; proct <= 10; proct++) {

try {
while(queue.size() == 5) {
Thread.sleep(1000);
}
Thread.sleep((int) (Math.random() * 1000));
queue.put(proct);// 放进去一个
System.out.println("放在 --> " + this.queue.size());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

class BQConsume implements Runnable {
private BlockingQueue<Integer> queue;

public BQConsume(BlockingQueue<Integer> queue) {
this.queue = queue;
}

public void run() {
for (int i = 1; i <= 10; i++) {
try {
while(queue.isEmpty()) {
Thread.sleep(1000);
}
Thread.sleep((int) (Math.random() * 1000));
System.out.println("拿出 <-- " + this.queue.size());
queue.take();// 拿出来一个
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
执行结果:
放在 --> 1
放在 --> 2
拿出 <-- 2
拿出 <-- 1
放在 --> 1
拿出 <-- 1
放在 --> 1
放在 --> 2
拿出 <-- 2
放在 --> 2
放在 --> 3
拿出 <-- 3
拿出 <-- 2
放在 --> 2
放在 --> 3
拿出 <-- 3
放在 --> 3
拿出 <-- 3
拿出 <-- 2
拿出 <-- 1
另外,团IDC网上有许多产品团购,便宜有口碑

10. JAVA多生产者多消费者问题。希望用wait()和notify().谢谢!



publicclassProceConsumerDemo{

publicstaticvoidmain(String[]args){
//1.创建资源
Resourceresource=newResource();
//2.创建两个任务
Procerprocer=newProcer(resource);
Consumerconsumer=newConsumer(resource);
//3.创建线程
/*
*多生产多消费产生的问题:重复生产、重复消费
*/
Threadthread0=newThread(procer);
Threadthread1=newThread(procer);

thread0.setName("生产者(NO0)");
thread1.setName("生产者(NO1)");

Threadthread2=newThread(consumer);
Threadthread3=newThread(consumer);

thread2.setName("消费者(NO2)");
thread3.setName("消费者(NO3)");

thread0.start();
thread1.start();
thread2.start();
thread3.start();
}
}

classResource{
privateStringname;
privateintcount=1;
//定义标记
privatebooleanflag;

//提供给商品赋值的方法
publicsynchronizedvoidsetName(Stringname){//thread0,thread1在这里运行
while(flag)//判断标记为true,执行wait等待,为false则生产
/*
*这里使用while,而不使用if的理由如下:
*
*thread0有可能第二次也抢到锁的执行权,判断为真,则有面包不生产,所以接下来执行等待,此时thread0在线程池中。
*接下来活的线程有3个(除了thread0),这三个线程都有可能获取到执行权.
*假设thread1获得了执行权,判断为真,则有面包不生产,执行等待。此时thread1又进入到了线程池中。
*接下来有两个活的线程thread2和thread3。假设thread2又抢到了执行权,所以程序转到了消费get处……
*/
try{
this.wait();//这里wait语句必须包含在try/catch块中,抛出异常。
}catch(InterruptedExceptione){
e.printStackTrace();
}
this.name=name+count;//第一个面包
count++;//2
System.out.println(Thread.currentThread().getName()+this.name);//thread0线程生产了面包1

//生产完毕,将标记改成true.
flag=true;//thread0第一次生产完面包以后,将标记改为真,表示有面包了

//唤醒消费者(这里使用notifyAll而不使用notify的原因在下面)

this.notifyAll();//第一次在这里是空唤醒,没有意义
}

/*
*通过同步,解决了没生产就消费的问题
*生产完以后,生产者释放了this锁,此时,生产者和消费者同时去抢锁,又是生产者抢到了锁,所以就出现了一直生产的情况。
*与“生产一个就消费一个的需求不符合”等待唤醒机制wait();该方法可以使线程处于冻结状态,并将线程临时存储到线程池
*notify();唤醒指定线程池中的任意一个线程。notifyAll();唤醒指定线程池中的所有线程
*这些方法必须使用在同步函数中,因为他们用来操作同步锁上的线程上的状态的。
*在使用这些方法时候,必须标识他们所属于的锁,标识方式就是锁对象.wait();锁对象.notify();锁对象.notifyAll();
*相同锁的notify()可以获取相同锁的wait();
*/

publicsynchronizedvoidgetName(){//thread2,thread3在这里运行
while(!flag)
/*
*……接着上面的程序执行分析thread2拿到锁获取执行权之后,判断!flag为假,则不等待,直接消费面包1,输出一次.
*消费完成之后将flag改为假接下来又唤醒了thread0或者thread1生产者中的一个
*假设又唤醒了thread0线程,现在活的线程有thread0,thread2,thread3三个线程
*假设接下来thread2又抢到了执行权,判断!flag为真,没面包了,停止消费,所以thread2执行等待.
*此时活着的线程有thread0和thread3。
*假设thread3得到了执行权,拿到锁之后进来执行等待,此时活着的线程只有thread0.
*所以thread0只能抢到执行权之后,生产面包2,将标记改为true告诉消费者有面包可以消费了。
*接下来执行notify唤醒,此时唤醒休眠中的3个线程中的任何一个都有可能。
*如果唤醒了消费者thread2或者thread3中的任何一个,程序都是正常。如果此时唤醒thread1则不正常。
*如果唤醒了thread1,此时活着的线程有thread0和thread1两个线程。
*假设thread0又获得了执行权,判读为真有面包,则又一次执行等待。
*接下来只有thread1线程有执行权(此时没有判断标记直接生产了,出错了),所以又生产了面包3。在这个过程中,面包2没有被消费。
*这就是连续生产和消费容易出现的问题。
*
*原因:被唤醒的线程没有判断标记就开始执行了,导致了重复的生产和消费发生。
*
*解决:被唤醒的线程必须判断标记,使用while循环标记,而不使用if判断的理由。
*
*但是接下来会出现死锁,原因在于:
*上面的程序中thread0在执行notify的时候唤醒了thread1,而此时thread2和thread3两个消费者线程都处于等待状态
*thread1在执行while判断语句之后判断为真,则执行等待,此时所有的线程都处于冻结等待状态了。
*
*原因:本方线程在执行唤醒的时候又一次唤醒了本方线程,而本方线程循环判断标记又继续等待,而导致所有的线程都等待。
*
*解决:本方线程唤醒对方线程,可以使用notifyAll()方法
* 唤醒之后,既有本方,又有对方,但是本方线程判断标记之后,会继续等待,这样就有对方线程在执行。
*/
try{
this.wait();
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println(Thread.currentThread().getName()+this.name);
//将标记改为false
flag=false;
//唤醒生产者
this.notify();
}
}

//生产者
classProcerimplementsRunnable{
privateResourceresource;

publicProcer(Resourceresource){
this.resource=resource;
}

publicvoidrun(){
while(true){
resource.setName("面包");
}
}
}

//消费者
{
privateResourceresource;

publicConsumer(Resourceresource){
this.resource=resource;
}

@Override
publicvoidrun(){
while(true){
resource.getName();
}
}
}

热点内容
剑三自动任务脚本 发布:2024-05-02 16:59:42 浏览:525
哪里有java视频教程 发布:2024-05-02 16:59:31 浏览:346
零食盒子密码多少 发布:2024-05-02 16:52:24 浏览:354
win10怎么访问局域网 发布:2024-05-02 16:51:37 浏览:471
功能点估算法是 发布:2024-05-02 16:24:38 浏览:166
b站非法访问 发布:2024-05-02 16:09:59 浏览:456
宝马523压缩机 发布:2024-05-02 16:00:40 浏览:611
冒险岛m韩服安卓汉化包哪里搞 发布:2024-05-02 16:00:24 浏览:955
云服务器托管平台 发布:2024-05-02 15:55:16 浏览:860
linux查看服务状态 发布:2024-05-02 15:55:15 浏览:933