Exemple #1
0
 public BlockingDetectionMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IApplicationLifetime lifetime)
 {
     _next          = next;
     _loggerFactory = loggerFactory;
     // Detect blocking
     _monitor = new BlockingMonitor(loggerFactory);
     _detectBlockingSyncCtx = new DetectBlockingSynchronizationContext(_monitor);
     _listener = new TaskBlockingListener(_monitor);
 }
 public DetectBlockingSynchronizationContext(BlockingMonitor monitor, SynchronizationContext syncCtx) : this(monitor)
 {
     _syncCtx = syncCtx;
 }
 public TaskBlockingListener(BlockingMonitor monitor)
 {
     _monitor = monitor;
 }
        public DetectBlockingSynchronizationContext(BlockingMonitor monitor)
        {
            _monitor = monitor;

            SetWaitNotificationRequired();
        }