public void Publish <T>(T ev) where T : IEvent
        {
            using (_metricsReporter.TimeScope(CreateMeter <T>("_Sync")))
            {
                IEventSubscription[] subscriptions;
                _handlersLock.EnterReadLock();
                try
                {
                    subscriptions = _subscriptions.Where(x => x.IsSubscribed(ev)).ToArray();
                }
                finally
                {
                    _handlersLock.ExitReadLock();
                }

                foreach (var s in subscriptions)
                {
                    try
                    {
                        s.CallIfSubscribed(ev);
                    }
                    catch (Exception ex)
                    {
                        _exceptionLogger.Error(s.Target.GetType(), ev, ex);
                    }
                }
            }
        }
        public void CallIfSubscribed(IEvent ev)
        {
            //can't use "as" because it doesn't work on value types, and
            //I don't want a class constraint on that type
            if (!IsSubscribed(ev))
            {
                return;
            }

            if (!_async)
            {
                Call(ev);
                return;
            }

            Task.Factory
            .StartNew(() => Call(ev))
            .ContinueWith(t =>
            {
                if (t.Exception == null)
                {
                    return;
                }

                foreach (var ex in t.Exception.Flatten().InnerExceptions)
                {
                    _exceptionLogger.Error(GetType(), ev, ex);
                }
            }, TaskContinuationOptions.OnlyOnFaulted);
        }