Skip to content

Commit 15adc67

Browse files
committed
Callback pattern: added real world example
1 parent 9312059 commit 15adc67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ Behavioral patterns are concerned with algorithms and the assignment of responsi
421421
**Applicability:** Use the Callback pattern when
422422
* When some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
423423

424+
**Real world examples:**
425+
* [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.
424426

425427
# Frequently asked questions
426428

0 commit comments

Comments
 (0)