There's a deadlock scenario if the stream is being shutdown while still receiving events, which can occur if using LifecycleEvents and cancelling the context.
Example reproduction case
func TestStreamShutdown(t *testing.T) {
s := NewStream(1, 2)
events := testEvents(1)
s.Shutdown()
s.Push(events[0])
}