java-design-patterns/guarded-suspension

layout, title, folder, permalink, pumlid, categories, tags
layout title folder permalink pumlid categories tags
pattern Guarded Suspension guarded-suspension /patterns/guarded-suspension/ RScv3SCm3030LU819FRPXg5fIm552tnYPFiyjRi3RkbAaYkdoQr5JBy369vrxz7oaSv6XmPhL3e6TCaJ0msU-CAoilTToyG8DdKOw5z0GzcAlvNAN_WZSD1brBHHPmxv0000 Concurrency
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. Guarded Suspension diagram

Applicability

Use Guareded Suspension pattern when:

  • the developer knows that the method execution will be blocked for a finite period of time