Replaces the (optional) Manager
implementation, adding the ability to check errors (from added tickers) with errors.Is
, and provides ErrManagerStopped
, for identifying and handling failed attempts to add to a manager, that is stopping or stopped.
Otherwise, the new behavior resembles the old, as closely as possible.
The original motivator for this change was fixing an unhandled edge case, where a race between add and stop could lead to a deadlock. The new implementation is both more polished, and significantly more idiomatic.