Improper synchronization can cause surprising results - Stale data
Reader thread may see an out-of-date value.
Side effects of Stale data :
- Print wrong values
- Prevent program from terminatng it
- Unexpcted exceptions
- Corrupted data
- Inaccurate computations
- Infinite loop
When a thread reads a variable without synchronization , it may see a stale value.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.