Exemple #1
0
 public BlockingDetectionMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IApplicationLifetime lifetime)
 {
     _next          = next;
     _loggerFactory = loggerFactory;
     // Detect blocking
     _detectBlockingSyncCtx = new DetectBlockingSynchronizationContext(loggerFactory);
 }
Exemple #2
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);
 }