[ library(changeset) | Reference Manual | Alphabetic Index ]
monitor_changes(+Vars, +Templates, +Prio, +CondList, +AttrMod, -ChangeStream)
Monitor variables for modifications
- Vars
- A list containing variables
- Templates
- A list of terms corresponding to the variables
- Prio
- Priority for the monitoring demons
- CondList
- Suspension list spec
- AttrMod
- Suspension list attribute module
- ChangeStream
- A lazy list of lists of changes
Description
Like monitor_changes_arr/5, but (instead of array indices) the
ChangeStream contains the elements of the Templates-list that
correspond to the modified variables, thus allowing arbitrary
information to be conveyed to the code that processes the changes.
[eclipse 10]: X1::1..9, X2::1..8,
monitor_changes([X1,X2],[info(1,X1),info(2,X2)], 8,
[min of fd, max of fd], fd, Stream),
X1 #> X2, X2 #>= 5.
Stream = [[info(1, X1{[6..9]})], [info(2, X2{[5..8]}), info(1, X1)]|More]
X1 = X1{[6..9]}
X2 = X2{[5..8]}