Closed eelstork closed 4 years ago
Draft fix for this. Syntax is conservative:
status Task => roe[ ... ];
Looks thread-safe; likely supports nesting also.
One possible alternative only requires a pseudo-type. Will put this on a branch later, if only for the hell of it.
Looks like both RoR and RoE may be needed to ensure decorators reset when they are expected to.
Dependable solution here is a reset-on-criterion (RoC) (and perhaps later, reset-on-condition) block. Reset-on-exit (RoE) is documented in BT literature, will work in many cases, but I am seeing edge cases where results are incorrect; keeping for now pending further testing/evaluation.
Reset-on-Resume (RoR) is a relatively new feature in Active Logic. Experiments show that Reset-on-Resume is not dependable enough, since it may cause issues when repeating tasks seamlessly (see #37) Reset-on-Exit is safer, and may be implemented as follows:
Or
Above syntax is primarily attractive because it does not require delimiters; other syntaxes are possible; this may come with a few desirable features:
cx()
androe
are interdependent, so one cannot accidentally be used without another (compile check)