From 15adc6751ecdbad1b26d3620a153d3a943f59fdd Mon Sep 17 00:00:00 2001 From: vehpsr Date: Fri, 27 Mar 2015 17:38:10 +0200 Subject: [PATCH] Callback pattern: added real world example --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 24735a590..4a7991277 100644 --- a/README.md +++ b/README.md @@ -421,6 +421,8 @@ Behavioral patterns are concerned with algorithms and the assignment of responsi **Applicability:** Use the Callback pattern when * When some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity. +**Real world examples:** +* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped. # Frequently asked questions