Shutdown broadway pipeline from the producer

Is there a built in way to shutdown a broadway pipeline from the producer?

The only way I clould think of is for the producer to send a message to some process when done, which then can shutdown the pipeline with Process.kill.

{:ok, pid} = MyBroadway.start_link(report_when_done_to: self())
receive do
  :producer_done ->
    Process.kill(pid, :normal)
end

(:report_when_done_to is passed down as a argument to the producer).