Currently, compute services like our SynchronousComputeService will continue executing a claimed Task even if that Task is no longer wanted by any user, and no longer actioned on any active AlchemicalNetworks. It will continue until execution has either succeeded or failed, and is largely a waste of compute resources that can come with additional opportunity cost if many such Tasks saturate limited resources.
Instead of this, we would like compute services to periodically check that their currently-claimed Tasks are still actioned by at least one active AlchemicalNetwork. For those Tasks that are not, they should immediately drop their claim and attempt to halt their execution.
To do this in the SynchronousComputeService, it will likely be necessary to make ProtocolUnit execution happen in a subprocess, since otherwise it will not be possible for ProtocolUnits executed in-process to be cleanly halted if the conditions above are met. The subprocess can then be SIGTERMed or SIGKILLed by the calling process.
Currently, compute services like our
SynchronousComputeServicewill continue executing a claimedTaskeven if thatTaskis no longer wanted by any user, and no longer actioned on any activeAlchemicalNetworks. It will continue until execution has either succeeded or failed, and is largely a waste of compute resources that can come with additional opportunity cost if many suchTasks saturate limited resources.Instead of this, we would like compute services to periodically check that their currently-claimed
Tasks are still actioned by at least one activeAlchemicalNetwork. For thoseTasks that are not, they should immediately drop their claim and attempt to halt their execution.To do this in the
SynchronousComputeService, it will likely be necessary to makeProtocolUnitexecution happen in a subprocess, since otherwise it will not be possible forProtocolUnits executed in-process to be cleanly halted if the conditions above are met. The subprocess can then beSIGTERMed orSIGKILLed by the calling process.