AsyncNativeOdbcConnection constructor
AsyncNativeOdbcConnection({})
Implementation
AsyncNativeOdbcConnection({
Duration? requestTimeout,
void Function(SendPort)? isolateEntry,
this.autoRecoverOnWorkerCrash = false,
this.workerCount = 1,
this.maxPendingRequests,
this.backpressureMode = AsyncBackpressureMode.failFast,
this.backpressureTimeout,
}) : _requestTimeout = requestTimeout,
_isolateEntry = isolateEntry {
if (workerCount < 1) {
throw ArgumentError.value(
workerCount,
'workerCount',
'must be greater than or equal to 1',
);
}
final pendingLimit = maxPendingRequests;
if (pendingLimit != null && pendingLimit < 1) {
throw ArgumentError.value(
pendingLimit,
'maxPendingRequests',
'must be null or greater than or equal to 1',
);
}
final pendingTimeout = backpressureTimeout;
if (pendingTimeout != null && pendingTimeout < Duration.zero) {
throw ArgumentError.value(
pendingTimeout,
'backpressureTimeout',
'must be null, zero, or greater than zero',
);
}
}