Well, that is basically what needs to happen, but in fact it is not just that command that should be run
in a separate coroutine, but rather all commands, except for prefix commands which need to be dealt with
a bit differently. And that is basically what I try to do in the patch. I think if just that one
command were special-cased, there would likely still remain some cases where there is a problem. Using
yield SUSPEND/yield CONTINUATION requires that the code calling yield SUSPEND be tightly coordinated with
the code that uses the continuation to wake it up. This could be ensured by setting state.continuation
only when the input system has in fact called yield SUSPEND. That is pretty much the basis of my patch,
just that it then seemed simpler to no longer use a coroutine at all for handling input events. |