Debian Codegraph @

man/grapes-twiddle-greater-than-grapes.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/sync.R
3 \name{\%~>\%}
4 \alias{\%~>\%}
5 \title{Signal Forwarder}
6 \usage{
7 cv \%~>\% cv2
8 }
9 \arguments{
10 \item{cv}{a 'conditionVariable' object, from which to forward the signal.}
11
12 \item{cv2}{a 'conditionVariable' object, to which the signal is forwarded.}
13 }
14 \value{
15 Invisibly, \code{cv2}.
16 }
17 \description{
18 Forwards signals from one 'conditionVariable' to another.
19 }
20 \details{
21 The condition value of \code{cv} is initially reset to zero when this operator
22 returns. Only one forwarder can be active on a \code{cv} at any given time, and
23 assigning a new forwarding target cancels any currently existing forwarding.
24
25 Changes in the condition value of \code{cv} are forwarded to \code{cv2}, but only on
26 each occassion \code{cv} is signalled. This means that waiting on \code{cv} will cause
27 a temporary divergence between the actual condition value of \code{cv} and that
28 recorded at \code{cv2}, until the next time \code{cv} is signalled.
29 }
30 \examples{
31 cva <- cv(); cvb <- cv(); cv1 <- cv(); cv2 <- cv()
32
33 cva \%~>\% cv1 \%~>\% cv2
34 cvb \%~>\% cv2
35
36 cv_signal(cva)
37 cv_signal(cvb)
38 cv_value(cv1)
39 cv_value(cv2)
40
41 }