Class SensitiveContentScanConcurrency
- Namespace
- MailFathom.Application.SensitiveContent
- Assembly
- MailFathom.Application.dll
The one budget of scans this process runs at once, whichever user's mail each of them is reading.
public sealed class SensitiveContentScanConcurrency : IDisposable
- Inheritance
-
SensitiveContentScanConcurrency
- Implements
- Inherited Members
Remarks
It is a type of its own rather than a field of SensitiveContentRedactor because a deployment composes one redaction per user posture and the permits are the process's CPU and memory rather than any user's. A semaphore inside each redaction would multiply the bound by the number of distinct postures, so a deployment that admitted a second user would silently double what one analyzer is asked to serve.
The bound is the deployment's for the same reason the analyzer address is: the machine is shared, and no user's document may buy more of it.
Constructors
- SensitiveContentScanConcurrency(int)
Initializes the budget of a deployment.
Methods
- AcquireAsync(CancellationToken)
Waits for one permit and returns what releases it.
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.