From Programming Language Pragmatics, by Scott
The fact that correctness depends on locking order means that lock-based program fragments do not compose: we cannot take existing lock-based abstractions and safely call them from within a new critical section.
What does "compose" mean?
Why do lock-based program fragments do not compose?
From Transform Java Future into a CompletableFuture
Java 8 introduces CompletableFuture, a new implementation of Future that is composable (includes a bunch of thenXxx methods). I'd like to use this exclusively, but many of the libraries I want to use return only non-composable Future instances.
What does it mean by some future instances are composable and some are not?
Thanks.