[英]Haskell: TVar: orElse
If you have如果你有
orElse ab
否则ab
then b
is only run if retry
is called explicitly in a
.那么
b
仅当在a
中显式调用retry
时才运行。 Otherwise orElse
would essentially become nondeterministic.否则
orElse
本质上会变得不确定。 (The rerunning of transactions that is done by the STM runtime is transparent and should not effect the outcome of any computation.) (由 STM 运行时重新运行事务是透明的,不应影响任何计算的结果。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.