blob: 1b80e6bedcee141e8408dd422d1a1fb0415c08c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Watchvars: module {
PATH: con "/dis/lib/watchvars.dis";
Watchvar: adt[T] {
c: chan of (T, chan of T);
new: fn(v: T): Watchvar[T];
get: fn(e: self Watchvar[T]): T;
set: fn(e: self Watchvar[T], v: T);
wait: fn(e: self Watchvar[T]): T;
waitc: fn(e: self Watchvar[T]): (T, chan of T);
waited: fn(e: self Watchvar[T], ic: chan of T, v: T);
};
};
|