<s>
Concurrent	B-Language
ML	I-Language
(	O
CML	O
)	O
is	O
a	O
concurrent	B-Operating_System
extension	O
of	O
the	O
Standard	B-Language
ML	I-Language
programming	O
language	O
characterized	O
by	O
its	O
ability	O
to	O
allow	O
programmers	O
to	O
create	O
composable	B-Application
communication	O
abstractions	B-Application
that	O
are	O
first-class	O
rather	O
than	O
built	O
into	O
the	O
language	O
.	O
</s>
<s>
The	O
design	O
of	O
CML	O
and	O
its	O
primitive	O
operations	O
have	O
been	O
adopted	O
in	O
several	O
other	O
programming	O
languages	O
such	O
as	O
GNU	B-Application
Guile	I-Application
,	O
Racket	B-Operating_System
,	O
and	O
Manticore	O
.	O
</s>
<s>
Many	O
programming	O
languages	O
that	O
support	O
concurrency	B-Operating_System
offer	O
communication	B-Operating_System
channels	I-Operating_System
that	O
allow	O
the	O
exchange	O
of	O
values	O
between	O
processes	B-Operating_System
or	O
threads	B-Operating_System
running	O
concurrently	O
in	O
a	O
system	O
.	O
</s>
<s>
Communications	O
established	O
between	O
processes	B-Operating_System
may	O
follow	O
a	O
specific	O
protocol	O
,	O
requiring	O
the	O
programmer	O
to	O
write	O
functions	O
to	O
establish	O
the	O
required	O
pattern	O
of	O
communication	O
.	O
</s>
<s>
Meanwhile	O
,	O
a	O
communicating	O
system	O
often	O
requires	O
establishing	O
multiple	O
channels	O
,	O
such	O
as	O
to	O
multiple	O
servers	B-Application
,	O
and	O
then	O
choosing	O
between	O
the	O
available	O
channels	O
when	O
new	O
data	O
is	O
available	O
.	O
</s>
<s>
This	O
can	O
be	O
accomplished	O
using	O
polling	B-General_Concept
,	O
such	O
as	O
with	O
the	O
select	B-Language
operation	O
on	O
Unix	O
systems	O
.	O
</s>
<s>
Combining	O
both	O
application-specific	O
protocols	O
and	O
multi-party	O
communication	O
may	O
be	O
complicated	O
due	O
to	O
the	O
need	O
to	O
introduce	O
polling	B-General_Concept
and	O
checking	O
for	O
blocking	B-Operating_System
within	O
a	O
pre-existing	O
protocol	O
.	O
</s>
<s>
Concurrent	B-Language
ML	I-Language
solves	O
this	O
problem	O
by	O
reducing	O
this	O
coupling	B-Application
of	O
programming	O
concepts	O
by	O
introducing	O
synchronizable	O
events	O
.	O
</s>
<s>
Events	O
are	O
a	O
first-class	O
abstraction	B-Application
that	O
can	O
be	O
used	O
with	O
a	O
synchronization	O
operation	O
(	O
called	O
in	O
CML	O
and	O
Racket	B-Operating_System
)	O
in	O
order	O
to	O
potentially	O
block	O
and	O
then	O
produce	O
some	O
value	O
resulting	O
from	O
communication	O
(	O
for	O
example	O
,	O
data	O
transmitted	O
on	O
a	O
channel	O
)	O
.	O
</s>
<s>
These	O
events	O
embody	O
patterns	O
of	O
communication	O
that	O
,	O
in	O
a	O
non-CML	O
language	O
,	O
would	O
typically	O
be	O
handled	O
using	O
a	O
polling	B-General_Concept
loop	O
or	O
function	O
with	O
handlers	O
for	O
each	O
kind	O
of	O
event	O
.	O
</s>
<s>
It	O
spawns	O
one	O
thread	B-Operating_System
with	O
a	O
channel	O
for	O
strings	O
,	O
and	O
another	O
thread	B-Operating_System
which	O
prints	O
a	O
string	O
received	O
on	O
the	O
channel	O
.	O
</s>
<s>
It	O
uses	O
SML/NJ	B-Application
and	O
CML	O
.	O
</s>
