PushSharp Push在停止之前不会处理队列

chr*_*din 3 apple-push-notifications ios c#-4.0 pushsharp

PushSharp仅在调用stop时处理队列.有没有人知道push sharp会处理队列或刷新队列的频率?每次我想发送通知以节省资源时,我都不想打电话停止和启动.

            pushService = new PushService();
            pushService.StartApplePushService(new ApplePushChannelSettings(prod,  cert.InputStream.ReadToEnd(), passConfig.Value));
  pushService.QueueNotification(
                NotificationFactory.Apple().ForDeviceToken("mydeviceid").WithAlert("Notifications Started!").WithSound("default").WithBadge(7));


            pushService.StopAllServices(true);
Run Code Online (Sandbox Code Playgroud)

chr*_*din 6

我是一个完整而彻底的白痴......

主线程在队列计时器处理通知之前完成执行.StopAllServices迫使线程等待......也许这会帮助其他人.