zhenfeng13 / concurrent-programming Goto Github PK
View Code? Open in Web Editor NEW:cactus:《实战java高并发程序设计》源码整理
Home Page: http://www.cnblogs.com/han-1034683568/p/6918160.html
:cactus:《实战java高并发程序设计》源码整理
Home Page: http://www.cnblogs.com/han-1034683568/p/6918160.html
src/chapter3/CyclicBarrierDemo.java
这个代码中,书中的运行结果最后是:司令:[士兵10个,任务完成!]
但是要有这样的结果,BarrierRun中的flag必须为true,但是整个代码中都没有置true的操作。
仔细想了想,作者的本意应该是执行到10个的时候,flag置true,不知道大家这里这个flag应该在哪里置true。
BarrierRun中的flag没有接口来修改,不知道作者是想通过什么方式来修改这个值。
另外,怎么感觉作者没有运行这个代码!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.