java-design-patterns/guarded-suspension
Anurag Agarwal dda09535e6 Resolves checkstyle errors for guarded-suspension, half-sync-half-async, hexagonal (#1064)
* Reduces checkstyle errors in guarded-suspension

* Reduces checkstyle errors in half-sync-half-async

* Reduces checkstyle errors in hexagonal
2019-11-10 19:01:32 +02:00
..
2017-11-28 20:55:52 +02:00
2019-10-12 20:05:54 +03:00
2017-11-28 21:28:53 +02:00

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Guarded Suspension guarded-suspension /patterns/guarded-suspension/ Concurrency
Java
Difficulty-Beginner

Intent

Use Guarded suspension pattern to handle a situation when you want to execute a method on object which is not in a proper state.

Guarded Suspension diagram

Applicability

Use Guarded Suspension pattern when the developer knows that the method execution will be blocked for a finite period of time

  • Balking