【文件属性】:
文件名称:ContextWorkflow:用于可中断和可补偿执行的DSL
文件大小:7.99MB
文件格式:ZIP
更新时间:2021-04-28 12:58:19
Scala
上下文工作流程
用于程序中断和补偿的嵌入式领域特定语言(E-DSL)。 该E-DSL主要支持...
像异步异常一样的中断
像事务和软件事务存储这样的回滚
像分隔符一样的延续
一个简单的例子是:
import contextworkflow . _
import cwutil . _
var sum = 0
def add (i : Int ) : CW [ Unit ] = {sum + = i} /+ {_ => sum - = i}
val add10 : CW [ Unit ] = foreachCW( 1 to 10 )(add(_))
val ctx : Stream [ Context ] = Stream ( Continue , Continue , Continue , Continue , Abort )
add10.exec(ctx) // sum = 0. An
【文件预览】:
ContextWorkflow-master
----cworkflow()
--------src()
----LICENSE(1KB)
----build.sbt(2KB)
----examples()
--------src()
----.gitignore(14B)
----video()
--------rapiro-abort.gif(3.41MB)
--------rapiro-suspend.gif(4.59MB)
----project()
--------build.properties(19B)
----README.md(4KB)