<s>
In	O
concurrent	B-Architecture
programming	I-Architecture
,	O
guarded	B-General_Concept
suspension	I-General_Concept
is	O
a	O
software	O
design	O
pattern	O
for	O
managing	O
operations	O
that	O
require	O
both	O
a	O
lock	B-Operating_System
to	O
be	O
acquired	O
and	O
a	O
precondition	O
to	O
be	O
satisfied	O
before	O
the	O
operation	O
can	O
be	O
executed	O
.	O
</s>
<s>
The	O
guarded	B-General_Concept
suspension	I-General_Concept
pattern	I-General_Concept
is	O
typically	O
applied	O
to	O
method	O
calls	O
in	O
object-oriented	O
programs	O
,	O
and	O
involves	O
suspending	O
the	O
method	O
call	O
,	O
and	O
the	O
calling	O
thread	O
,	O
until	O
the	O
precondition	O
(	O
acting	O
as	O
a	O
guard	B-Language
)	O
is	O
satisfied	O
.	O
</s>
<s>
Because	O
it	O
is	O
blocking	B-Operating_System
,	O
the	O
guarded	B-General_Concept
suspension	I-General_Concept
pattern	I-General_Concept
is	O
generally	O
only	O
used	O
when	O
the	O
developer	O
knows	O
that	O
a	O
method	O
call	O
will	O
be	O
suspended	O
for	O
a	O
finite	O
and	O
reasonable	O
period	O
of	O
time	O
.	O
</s>
<s>
If	O
the	O
developer	O
knows	O
that	O
the	O
method	O
call	O
suspension	O
will	O
be	O
indefinite	O
or	O
for	O
an	O
unacceptably	O
long	O
period	O
,	O
then	O
the	O
balking	B-Architecture
pattern	I-Architecture
may	O
be	O
preferred	O
.	O
</s>
<s>
In	O
Java	O
,	O
the	O
Object	O
class	O
provides	O
the	O
wait( )	O
and	O
notify( )	O
methods	O
to	O
assist	O
with	O
guarded	B-General_Concept
suspension	I-General_Concept
.	O
</s>
<s>
An	O
example	O
of	O
an	O
actual	O
implementation	O
would	O
be	O
a	O
queue	O
object	O
with	O
a	O
get	O
method	O
that	O
has	O
a	O
guard	B-Language
to	O
detect	O
when	O
there	O
are	O
no	O
items	O
in	O
the	O
queue	O
.	O
</s>
