单纯的consumer竞争不过两个producer,synchronized是非公平锁。你在producer方法的wait()后面sleep 1s看看。
点赞 1

相关推荐

04-08 16:35
门头沟学院 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务