hydro-project / hydroflow

Hydro's low-level dataflow runtime
https://hydro.run/docs/hydroflow/
Apache License 2.0
473 stars 33 forks source link

Graceful shutdown for transducers #1278

Open rohitkulshreshtha opened 4 months ago

rohitkulshreshtha commented 4 months ago

Give hydroflow programs a way to shut down a transducer gracefully.

Potential design areas:

  1. Stop accepting new work.
  2. Bounded wait for pending work to finish (drain).
  3. Signalling code outside the transducer?

The first step in this issue is coming up with a design.

shadaj commented 3 months ago

Hydro Deploy currently has a very similar implementation of this which waits for a signal from the controller and then just drops the Hydroflow future. But something more graceful would probably be nice.