I think this would be quite useful for more powerful scripting.
The updated exec & command could maybe look like:
exec & -- <CMD> ---- <OP>
This design would entail: CMD is executed non-blockingly, and once it terminates, <OP> is added to the remaining_operations. The question would be: if, at that point, the remaining_operations are not empty, then we have to decided where exactly to add OP. Should it be executed directly (before all other operations), or only after all queued operations? I would argue it should be appended to the list, because we usually only have a non-empty remaining_operations when we are currently in a blocking state, where nothing should be allowed to be executed. Therefore, OP would only be executed once we have an empty remaining_operations.
We would still have to decide on how to separate exec & -- <CMD> from <OP>. Not sure if ---- is ideal there, I think we shouldn't use a simple -- though, as that would be confusing if we e.g. have exec & -- <CMD> -- exec & -- <CMD>". Maybe we should remove --fromexec & -- ` entirely, but I really like that syntax for creating separation.
I think this would be quite useful for more powerful scripting.
The updated
exec &command could maybe look like:This design would entail:
CMDis executed non-blockingly, and once it terminates,<OP>is added to theremaining_operations. The question would be: if, at that point, theremaining_operationsare not empty, then we have to decided where exactly to addOP. Should it be executed directly (before all other operations), or only after all queued operations? I would argue it should be appended to the list, because we usually only have a non-emptyremaining_operationswhen we are currently in a blocking state, where nothing should be allowed to be executed. Therefore,OPwould only be executed once we have an emptyremaining_operations.We would still have to decide on how to separate
exec & -- <CMD>from<OP>. Not sure if----is ideal there, I think we shouldn't use a simple--though, as that would be confusing if we e.g. haveexec & -- <CMD> -- exec & -- <CMD>". Maybe we should remove--fromexec & -- ` entirely, but I really like that syntax for creating separation.