2 * 2004 Matthew
Fluet (mfluet@acm
.org
)
3 * Ported to MLton threads
.
7 * COPYRIGHT (c
) 1995 AT
&T Bell Laboratories
.
8 * COPYRIGHT (c
) 1989-1991 John H
. Reppy
11 structure CVar
: CVAR
=
13 structure R
= RepTypes
16 (* Condition variables are essentially unit valued ivars
, and
17 * are used for various internal synchronization conditions
18 * (e
.g
., nack events
, I
/O synchronization
, and thread termination
).
20 datatype cvar
= datatype R
.cvar
21 datatype cvar_state
= datatype R
.cvar_state
23 fun new () = CVAR (ref (CVAR_unset
[]))