23 lines
557 B
Markdown
Raw Permalink Normal View History

---
layout: pattern
title: Guarded Suspension
folder: guarded-suspension
permalink: /patterns/guarded-suspension/
categories: Concurrency
tags:
- Decoupling
---
## Intent
2017-02-28 15:06:50 +01:00
Use Guarded suspension pattern to handle a situation when you want to execute a method on object which is not in a proper state.
2017-01-06 01:01:47 +01:00
## Class diagram
![Guarded Suspension diagram](./etc/guarded-suspension.png)
## Applicability
2017-02-28 15:06:50 +01:00
Use Guarded Suspension pattern when the developer knows that the method execution will be blocked for a finite period of time
2017-02-28 15:06:50 +01:00
## Related patterns
2017-02-28 15:06:50 +01:00
* Balking