desim icon indicating copy to clipboard operation
desim copied to clipboard

feature request: process interruption

Open quantverse opened this issue 5 years ago • 5 comments

Is it possible to implement process interruption in a similar way as in simpy?

quantverse avatar May 09 '19 15:05 quantverse

What should it do?

garro95 avatar May 09 '19 15:05 garro95

Exactly this: https://simpy.readthedocs.io/en/latest/simpy_intro/process_interaction.html#interrupting-another-process

quantverse avatar May 12 '19 19:05 quantverse

Isn't it like yielding an Effect::Event(0.0, other), other being the other process you want to interrupt?

garro95 avatar May 14 '19 14:05 garro95

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.

garro95 avatar May 14 '19 14:05 garro95

I really like the idea with Result actually...so I guess this has to wait until generator resume arguments are implemented...

quantverse avatar May 16 '19 18:05 quantverse