Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
LtWorf
· 8mo ago · 0 comments
Another thread can access it and do that, how could the compiler possibly know about it?
Comments
[–]
bmm6o
8mo ago
There are documented ways to ensure that changes are visible across threads (e.g. locks). If these are not used, the compiler is within its rights to not go out of its way to pull changes from another thread.
[–]
LtWorf
OP
8mo ago
Except python has a well documented global lock.
[–]
anematode
8mo ago
This thread is discussing Java, not Python
[–]
LtWorf
OP
8mo ago
java has private attributes, python does not