Rename sendMessage to send
This commit is contained in:
parent
9b97f1135e
commit
8c02bf807e
|
@ -41,9 +41,9 @@ template stopIf*(cond, body: untyped): untyped =
|
|||
proc getCurrentFacet(): Facet {.inject, used.} = facet
|
||||
body
|
||||
|
||||
template sendMessage*(msg: untyped): untyped =
|
||||
template send*(msg: Preserve): untyped =
|
||||
mixin getCurrentFacet
|
||||
send(getCurrentFacet(), toPreserve(msg))
|
||||
send(getCurrentFacet(), msg)
|
||||
|
||||
proc wrapDoHandler(pattern, handler: NimNode): NimNode =
|
||||
## Generate a procedure that unpacks a `pattern` match to fit the
|
||||
|
|
|
@ -25,7 +25,7 @@ syndicate testDsl:
|
|||
# echo "client: box has gone"
|
||||
onAsserted(BoxState % `?*`) do (v: int):
|
||||
echo "client: learned that box's value is now ", v
|
||||
sendMessage(SetBox % v.succ)
|
||||
send(SetBox % v.succ)
|
||||
onRetracted(BoxState % `?_`) do (_):
|
||||
echo "client: box state disappeared"
|
||||
onStop:
|
||||
|
|
Loading…
Reference in New Issue