Comments (2)
Thanks for the tip. I had the false impression that the JVM prevented concurrent dynamic constant bootstrap and didn't think to check. I probably should remove the examples too then.
If you put those two things together, it adds up to potential deadlock if user locking is used and there is a cycle in constant initialization.
The quotation above seems to preclude deadlocks and I don't understand how they fit together to produce it. In any case, cycles in initialization seem like the responsibility of the programmer (just like endless cycles in function calls) to me.
from dycon.
Thanks for the tip. I had the false impression that the JVM prevented concurrent dynamic constant bootstrap and didn't think to check. I probably should remove the examples too then.
It's unfortunate to be sure. With the recent talk of lazy statics, I wonder if they don't regret this decision now.
If you put those two things together, it adds up to potential deadlock if user locking is used and there is a cycle in constant initialization.
The quotation above seems to preclude deadlocks and I don't understand how they fit together to produce it.
They only do when combined with the latter part of the sentence "... if user locking is used". Sorry if my wording is not clear.
In any case, cycles in initialization seem like the responsibility of the programmer (just like endless cycles in function calls) to me.
Yes, this is a valid perspective. The user does have to be careful when using locks in combination with indeterminate initialization order; the JVM will do nothing to help you diagnose the issue if you do inadvertently cause a deadlock (which is unfortunate IMO).
from dycon.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dycon.