title: How to end / close a MutableSharedFlow?
body: <p><code>SharedFlow</code> has just been introduced in coroutines 1.4.0-M1, and it is meant to replace all <code>BroadcastChannel</code> implementations (as stated in the <a href="https://github.com/Kotlin/kotlinx.coroutines/issues/2034" rel="noreferrer">design issue</a> decription).</p>
  <p>I have a use case where I use a <code>BroadcastChannel</code> to represent incoming web socket frames, so that multiple listeners can &quot;subscribe&quot; to the frames.
  The problem I have when I move to a <code>SharedFlow</code> is that I can't &quot;end&quot; the flow when I receive a close frame, or an upstream error (which I would like to do to inform all subscribers that the flow is over).</p>
  <p>How can I make all subscriptions terminate when I want to effectively &quot;close&quot; the <code>SharedFlow</code>?
  Is there a way to tell the difference between normal closure and closure with exception? (like channels)</p>
  <p>If <code>MutableSharedFlow</code> doesn't allow to convey the end of the flow to subscribers, what is the alternative if <code>BroadcastChannel</code> gets deprecated/removed?</p>