Guarded suspension
From Wikipedia, the free encyclopedia
In concurrent programming, guarded suspension[1] is a software design pattern for managing operations that require both a lock to be acquired and a precondition to be satisified before the operation can be executed. The guarded suspension pattern is typically applied to method calls in object-oriented programs, and involves suspending the method call, and the calling thread, until the precondition (acting as a guard) is satisfied.
[edit] See also
- Read write lock pattern
- Balking pattern is an alternative pattern for dealing with a precondition
- Guarded commands includes a similar language construct
[edit] References
- ^ Lea, Doug (2000). Concurrent Programming in Java Second Edition. Reading, MA: Addison-Wesley. ISBN 0-201-31009-0.