<s>
The	O
reactor	O
design	O
pattern	O
is	O
an	O
event	O
handling	O
pattern	O
for	O
handling	O
service	O
requests	O
delivered	O
concurrently	B-Operating_System
to	O
a	O
service	O
handler	O
by	O
one	O
or	O
more	O
inputs	O
.	O
</s>
<s>
The	O
service	O
handler	O
then	O
demultiplexes	B-Architecture
the	O
incoming	O
requests	O
and	O
dispatches	O
them	O
synchronously	O
to	O
the	O
associated	O
request	O
handlers	O
.	O
</s>
<s>
Synchronous	O
Event	O
Demultiplexer	O
Uses	O
an	O
event	B-General_Concept
loop	I-General_Concept
to	O
block	O
on	O
all	O
resources	O
.	O
</s>
<s>
All	O
reactor	O
systems	O
are	O
single-threaded	B-Operating_System
by	O
definition	O
,	O
but	O
can	O
exist	O
in	O
a	O
multithreaded	B-Operating_System
environment	O
.	O
</s>
<s>
The	O
reactor	B-Operating_System
pattern	I-Operating_System
completely	O
separates	O
application-specific	O
code	O
from	O
the	O
reactor	O
implementation	O
,	O
which	O
means	O
that	O
application	O
components	O
can	O
be	O
divided	O
into	O
modular	O
,	O
reusable	O
parts	O
.	O
</s>
<s>
The	O
reactor	B-Operating_System
pattern	I-Operating_System
can	O
be	O
more	O
difficult	O
to	O
debug	O
than	O
a	O
procedural	O
pattern	O
due	O
to	O
the	O
inverted	O
flow	O
of	O
control	O
.	O
</s>
<s>
Also	O
,	O
by	O
only	O
calling	O
request	O
handlers	O
synchronously	O
,	O
the	O
reactor	B-Operating_System
pattern	I-Operating_System
limits	O
maximum	O
concurrency	B-Operating_System
,	O
especially	O
on	O
symmetric	B-Operating_System
multiprocessing	I-Operating_System
hardware	O
.	O
</s>
<s>
The	O
scalability	O
of	O
the	O
reactor	B-Operating_System
pattern	I-Operating_System
is	O
limited	O
not	O
only	O
by	O
calling	O
request	O
handlers	O
synchronously	O
,	O
but	O
also	O
by	O
the	O
demultiplexer	O
.	O
</s>
