So, does workLots_susp actually need to be repeatedly suspended to keep the task window responsive? Is the above pattern (i.e., inserting calls to yield) suitable for use in my "real" applications, or are there other aspects to consider? Do I need to worry about execution contexts, or is that usually unnecessary?
In my real application, the long-running process that I want to run in the background is a call to an Earley parser.
If I would insert calls to yield into the parser's routines, I needed to turn at least the parser's top-level routines into suspending predicates. However, that does not seem elegant to me. Is there a way to keep suspension issues outside of the parser's code while still ensuring the responsiveness of the task window?