A graph can be in 3 different states: READY, RUNNING, or STOPPING.
when a graph is just created, its state is READY
after start() is called, the graph moves in RUNNING state
when stop() is called, or the source returns nothing, the graph moves in STOPPING state, until wait_until_done() is called and returns, after which it goes back into READY state
Note that wait_until_done() also does cleanup, and must be called before starting the graph again.
We can also expose a get_state(graph) which returns the current state, if ever someone needs it.
A graph can be in 3 different states: READY, RUNNING, or STOPPING.
start()
is called, the graph moves in RUNNING statestop()
is called, or the source returnsnothing
, the graph moves in STOPPING state, untilwait_until_done()
is called and returns, after which it goes back into READY stateNote that
wait_until_done()
also does cleanup, and must be called before starting the graph again.We can also expose a
get_state(graph)
which returns the current state, if ever someone needs it.Preferably we implement #10 before this one.