Skip to content

Instantly share code, notes, and snippets.

View dreamsjtu's full-sized avatar
💤

Meng dreamsjtu

💤
  • Wellington, NZ.
View GitHub Profile
@dreamsjtu
dreamsjtu / _README.md
Created August 23, 2021 20:58 — forked from mtorchiano/_README.md
Replacing Observer-Observable (inheritance vs. composition)

Replacing Observer-Observable (inheritance vs. composition)

Since Java 9 the pair Observer-Observable have been declared deprecated.

They don't provide a rich enough event model for applications. 
For example, they support only the notion that something has changed, 
but they don't convey any information about what has changed. 
There are also some thread-safety and sequencing issues that cannot be fixed compatibly.