Constructor.
Increases the count of pending items and throttles the suspendables.
Decreases the count of pending items and throttles the suspendables.
Increases the count of pending items and throttles the suspendables.
Increases the count of pending items and throttles the suspendables.
Decreases the count of pending items and throttles the suspendables.
Increases the count of pending items and throttles the suspendables.
Decreases the count of pending items and throttles the suspendables.
Decreases the count of pending items and throttles the suspendables.
When the number of pending items reaches this value or greater, the suspendables will be suspended.
When the number of pending items reaches this value or less, the suspendables will be resumed.
Decides whether the suspendables should be suspended. Called by throttle() when not suspended.
Decides whether the suspendables should be resumed. Called by throttle() when suspended.
SuspendableThrottlerCount unittest.
static class SuspendableThrottlerCount_Test : ISuspendableThrottlerCount_Test { private SuspendableThrottlerCount count; this ( ) { this.count = new SuspendableThrottlerCount(this.suspend, this.resume); super(this.count); } override void inc ( ) { this.count++; } override void dec ( ) { this.count--; } } scope test = new SuspendableThrottlerCount_Test;
Simple suspendable throttler which just counts the number of pending items, and throttles the suspendables based on that count. No data other than the pending count is stored.