ParentFull threadVagueMag·I make pretty heavy use of Java's AutoCloseable interface for this purpose. The lambda approach is an interesting one that could be applied in most languages though.View on HN