Run this activity over some environment and given a schedule.
Run this activity over some environment and given a schedule.
Prevent this activity from running once dequeued from the schedule
Prevent this activity from running once dequeued from the schedule
An
Activity
that will run once, but only if it has not beenstop()
ed.The initial implementation used had
,activity: Option[Activity]
. Callingstop
set this field toNone
. It felt like proper Scala. However, it also allows for substitution of an activity, which is wrong. An immutable activity is better.Calling
stop
does not remove theTentativeActivity
from the schedule. Instead, oncedequeued
, it simply fails to take any action onapply(env, schedule)
.