网站首页 站内搜索

搜索结果

查询Tags标签: 开锁,共有 1条记录
  • JUC学习笔记——共享模型之管程

    实际代码体现// 针对counter,我们一个线程++,一个线程--各运行5000次static int counter = 0;public static void main(String[] args) throws InterruptedException {Thread t1 = new Thread(() -> {for (int i = 0; i < 5000; i++) {counter++;}}, "t1&quo…

    2022/11/12 23:54:03 人评论 次浏览
扫一扫关注最新编程教程