Skip to content

三中方式实现生产者与消费者模型#157

Open
mywebc wants to merge 1 commit into
hcsp:masterfrom
mywebc:master
Open

三中方式实现生产者与消费者模型#157
mywebc wants to merge 1 commit into
hcsp:masterfrom
mywebc:master

Conversation

@mywebc

@mywebc mywebc commented Jul 15, 2020

Copy link
Copy Markdown
Contributor
  • 这个PR解答了当前仓库中的题目(机器人会自动判题并合并当前PR)
  • 这个PR修复了当前仓库中的一些代码缺陷(机器人不会判题,而是由管理员来处理当前PR)

@hcsp-bot

Copy link
Copy Markdown
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!


public class ProducerConsumer1 {

private static int MAX_NUM = 10;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'MAX_NUM' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

// producer.join();
// }

private static int MAX_NUM = 10;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'MAX_NUM' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。


// 实例化lock
private static Lock lock = new ReentrantLock();
private static Condition producer_con = lock.newCondition();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'producer_con' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

// 实例化lock
private static Lock lock = new ReentrantLock();
private static Condition producer_con = lock.newCondition();
private static Condition consumer_con = lock.newCondition();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'consumer_con' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。


// 实例化lock
private static Lock lock = new ReentrantLock();
private static Condition producer_con = lock.newCondition();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'producer_con' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

// 实例化lock
private static Lock lock = new ReentrantLock();
private static Condition producer_con = lock.newCondition();
private static Condition consumer_con = lock.newCondition();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称 'consumer_con' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

@hcsp-bot

Copy link
Copy Markdown
Contributor

你的提交 8a8a0a9 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

1 similar comment
@hcsp-bot

Copy link
Copy Markdown
Contributor

你的提交 8a8a0a9 ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

@hcsp-bot hcsp-bot mentioned this pull request Jul 15, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants