desim
desim copied to clipboard
feature request: process interruption
Is it possible to implement process interruption in a similar way as in simpy
?
What should it do?
Exactly this: https://simpy.readthedocs.io/en/latest/simpy_intro/process_interaction.html#interrupting-another-process
Isn't it like yielding an Effect::Event(0.0, other), other being the other process you want to interrupt?
Maybe we can make the context be a Result
and make it an Err() when the woken up process is interrupted and maybe in other situations, waiting it to be what we pass to the process when resuming with the argument.
I really like the idea with Result
actually...so I guess this has to wait until generator resume arguments are implemented...