21 lines
530 B
Markdown
21 lines
530 B
Markdown
|
---
|
||
|
layout: pattern
|
||
|
title: Guarded Suspension
|
||
|
folder: guarded-suspension
|
||
|
permalink: /patterns/guarded-suspension/
|
||
|
categories: Concurrency
|
||
|
tags:
|
||
|
- Java
|
||
|
- Difficulty-Beginner
|
||
|
---
|
||
|
|
||
|
## Intent
|
||
|
Use Guareded suspension pattern to handle a situation when you want to execute a method on object which is not in a proper state.
|
||
|

|
||
|
|
||
|
## Applicability
|
||
|
Use Guareded Suspension pattern when:
|
||
|
|
||
|
* the developer knows that the method execution will be blocked for a finite period of time
|
||
|
|