| 1 |
(* cvar.sml |
| 2 |
* 2004 Matthew Fluet ([email protected]) |
| 3 |
* Ported to MLton threads. |
| 4 |
*) |
| 5 |
|
| 6 |
(* ??? |
| 7 |
* COPYRIGHT (c) 1995 AT&T Bell Laboratories. |
| 8 |
* COPYRIGHT (c) 1989-1991 John H. Reppy |
| 9 |
*) |
| 10 |
|
| 11 |
structure CVar : CVAR = |
| 12 |
struct |
| 13 |
structure R = RepTypes |
| 14 |
|
| 15 |
|
| 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). |
| 19 |
*) |
| 20 |
datatype cvar = datatype R.cvar |
| 21 |
datatype cvar_state = datatype R.cvar_state |
| 22 |
|
| 23 |
fun new () = CVAR (ref (CVAR_unset [])) |
| 24 |
end |